logoalt Hacker News

titanomachyyesterday at 7:37 PM2 repliesview on HN

I don’t know gleam, but surely

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

   list.map(calculate_instruction)

?

Replies

tymscaryesterday at 7:40 PM

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.

show 2 replies
WJWyesterday at 7:40 PM

That is correct.