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

In typed functional programming the more general the type of a variable, the shorter it's name.

Eg in the following snippet

    map :: (a -> b) -> [a] -> [b]
    map f (x:xs) = f x : map f xs
    map _ [] = []
there's nothing known about x (apart from that you can apply f to it). So there's no way to give it a more descriptive name. We just don't have more information.


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

Search: