[Haskell-cafe] Uses of `fix' combinator
Khudyakov Alexey
alexey.skladnoy at gmail.com
Thu Feb 19 09:00:03 EST 2009
Hello,
While browsing documentation I've found following function
> -- | @'fix' f@ is the least fixed point of the function @f@,
> -- i.e. the least defined @x@ such that @f x = x at .
> fix :: (a -> a) -> a
> fix f = let x = f x in x
I have two questions. How could this function be used? I'm unable to imagine
any. Naive approach lead to nothing (no surprise):
Prelude Data.Function> fix (^^2)
<interactive>: out of memory (requested 2097152 bytes)
Second question what does word `least' mean?`a' isn't an Ord instance.
--
Khudyakov Alexey
More information about the Haskell-Cafe
mailing list