fix f = f (fix f) fact = (\f -> (\x -> if x == 0 then 1 else x * f (x - 1))) test = (fix fact) 5 -- This will not type -- y = (\f -> (\g -> f (g g)) (\g -> f (g g))) -- This works on some versions of GHC, and in Hugs -- newtype Mu a = Roll { unroll :: Mu a -> a } -- fix2 f = (\x -> f ((unroll x) x)) (Roll (\x -> f ((unroll x) x))) -- test2 = (fix2 fact) 3