[Haskell-cafe] Examples of useful functions of order >= 3?
Ben Lippmeier
Ben.Lippmeier at anu.edu.au
Fri Dec 14 05:45:23 EST 2007
Hi all,
I'm working on a type-based side effect analysis for a Haskell-like
language, and need to test it against some more higher order functions.
The situation is a bit icky because it uses bounded quantification
and various related issues (ie covariance vs contravariance) only
come into play when dealing with functions of order >= 3.
Trouble is, the vast majority of useful higher order functions
that I can think of are of order 2. Oh, I can certainly invent toys
like:
order3 f = f succ
order4 b f = if b then f else order3
.. and so on, but I'm left feeling unsatisfied.
I vaguely remember a paper called something like "Is there any use
for a seventh order function?", but I forget why they were used, and
I can't find it on Google, or ACM or any of the other likely places.
Does anyone have any examples of code (in whatever language) which
usefully uses functions of order >= 3?? Preferably up to 5?
Thanks,
Ben.
More information about the Haskell-Cafe
mailing list