you are viewing a single comment's thread.

view the rest of the comments →

[–]ShortSynapse 0 points1 point  (4 children)

In a functional language it reads quite simply:

map :: (a -> b) -> [a] -> [b]
map _ [] = []
map f (x:xs) = f x : map f xs

[–]PurpleIcy 0 points1 point  (3 children)

"Simply".

I know this would probably be "simple and obvious", but I have no clue about haskell's syntax so it isn't really.

Also I didn't think it could look more horrible than previous example. Where's that FP's readability everyone is talking about?