Remix.run Logo
titanomachy 11 hours ago

I don’t know gleam, but surely

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

   list.map(calculate_instruction)

?
tymscar 11 hours ago | parent | next [-]

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.

4 hours ago | parent | next [-]
[deleted]
Hasnep 3 hours ago | parent | prev [-]

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.

WJW 11 hours ago | parent | prev [-]

That is correct.