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

As another nice effect, higher-order functions (or as we call them in their use as control structures: combinators) unify data structure and control structures. E.g. folding over a list is equivalent to various loops, the Monad instance of Maybe represents simple exception handling, trees and their traversal are identifiable in some sense, etc.

At least in lazy, statically typed functional languages, like e.g. Haskell.



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

Search: