newtype Fun a = Fun (Fun a -> a) fun x@(Fun f) = f x myFix = fun (Fun fun)
fixedFac f 0 = 1 fixedFac f n = n * f (n - 1) fac = myFix fixedFac
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
Other options:
no subject
В частности вот:
Это хотел.
no subject
no subject
Какие вы оба умные :-)
no subject
no subject