Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: