[Haskell-cafe] least fixed points above something

Ryan Ingram ryani.spam at gmail.com
Fri Mar 20 05:23:37 EDT 2009

On Fri, Mar 20, 2009 at 1:01 AM, Dan Doel <dan.doel at gmail.com> wrote:
> However, to answer Luke's wonder, I don't think fixAbove always finds fixed
> points, even when its preconditions are met. Consider:
>  f []     = []
>  f (x:xs) = x:x:xs
>  twos = 2:twos

How about

> fixAbove f x = x `lub` fixAbove f (f x)

Probably doesn't work (or give good performance) with the current
implementation of "lub" :)

But if "lub" did work properly, it should give the correct answer for
fixAbove f (2:undefined).

  -- ryan

More information about the Haskell-Cafe mailing list