http://palm-mute.livejournal.com/ ([identity profile] palm-mute.livejournal.com) wrote in [personal profile] lomeo 2007-04-10 03:29 pm (UTC)

Да я понял.
newtype Fun a = Fun (Fun a -> a)

unwrap (Fun f) = f

selfApply f = unwrap f f

myfix f = selfApply $ Fun $ \g -> f (selfApply g)

> myfix (\f n -> if n==0 then 1 else n * f (n-1)) 5
120

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting