12 Jun
2007
12 Jun
'07
3:19 p.m.
Am Dienstag, 12. Juni 2007 11:51 schrieb David House:
[…]
Another nice way to think about this is in terms of fixed points. Remember that an equation like:
numbers = 1 : map (1 +) numbers
Is equivalent to a version using fix:
numbers = fix (\ns -> 1 : map (1 +) ns)
So numbers gets assigned the fixpoint of the function \ns -> 1 : map (1 +) ns.
It is always the *least* fixpoint. For example, (0 *) has the fixpoint _|_ (because 0 * _|_ = _|_) but every integer is also a fixpoint of it. However, _|_ is less than all those integers in the sense of “less defined”, and so the result of fix (0 *) is _|_.
[…]
Best wishes, Wolfgang