zlacker

[return to "I tried Gleam for Advent of Code"]
1. titano+9k[view] [source] 2025-12-13 19:37:23
>>tymsca+(OP)
I don’t know gleam, but surely

    list.map(fn(line) { line |> calculate_instruction })
Could be written

   list.map(calculate_instruction)

?
◧◩
2. tymsca+Nk[view] [source] 2025-12-13 19:40:53
>>titano+9k
You're right, but loads of times I just left that there because I probably did something more involved in the map that I ended up deleting later without realising.
◧◩◪
3. Hasnep+Le1[view] [source] 2025-12-14 04:26:13
>>tymsca+Nk
This sounds like the kind of situation where the LSP could suggest the simpler code, I'll see if there's an issue for it already and suggest it if not.
[go to top]