Reputation: 74384
For instance, mask
in Haskell is of type (((forall a . IO a -> IO a) -> IO b) -> IO b)
. What is the purpose of such a function? Any language with a notion of a higher-order function is welcome.
For purposes of exactness, include only functions which are defined in public libraries or in use in live code.
Upvotes: 5
Views: 389
Reputation: 4249
Okasaki exhibits a 6th order function: Even Higher-Order Functions for Parsing or Why Would Anyone Ever Want To Use a Sixth-Order Function?
Upvotes: 14