
19 Feb
2009
19 Feb
'09
2 p.m.
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@. 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