is identity the only polymorphic function without typeclasses?
Andrew J Bromage
ajb@spamcop.net
Tue, 4 Mar 2003 10:22:38 +1100
G'day.
On Mon, Mar 03, 2003 at 11:49:29AM +0200, Cagdas Ozgenc wrote:
> Yes, I thought about these too. Do you find these functions practically
> useful? Can you give an example where I can utilize these functions?
Functions like this are useful for plugging into higher-order functions
to tailor them for your specific needs.
Here's an artificial example:
length = sum . map (const 1)
Cheers,
Andrew Bromage