Hi,<br><br>I found myself writing the following<br><br>leastFixedPoint :: (Eq a) => (a -> a) -> a -> a<br>leastFixedPoint f x = fst . head . dropWhile (uncurry (/=)) $ zip l (tail l)<br> where l = iterate f x<br>
<br>and was a bit surprised that I couldn't get any matches on hoogle for the type above. The closest one is fix :: (a -> a) -> a but that sort of assumes that we're starting the fixed point search from the bottom element (undefined).<br>
<br>Anyway, is there a nicer way of doing the above?<br><br>Jens<br><br>