Comment

Comment by WalterBright

That code is an example of f(a) being equivalent to a.f(). You can do it the f(a) way if you prefer.

`map` is an operation on a data structure that replaces one element with another, in this case `a` gets replaces with `idup(a)`. The `idup` makes a copy of its argument in memory, and marks the data is immutable.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton