Comment

Comment by stuffihavemade

To expand a bit on with tikhonj is saying, consider the type signature of map:

map :: [a] -> (a -> b) -> [b]

In an implementation of map with this signature, the only way to get a list of b's is to use the function passed in. So, there's no way to do the array unwrapping shenanigans from the js example.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton