http://lomeo.livejournal.com/ ([identity profile] lomeo.livejournal.com) wrote in [personal profile] metaclass 2012-10-11 07:53 pm (UTC)

В статических можно эмулировать с помощью изоморфных типов. Например, определив тип
newtype F a = F (F a → a)

мы получили тип изоморфный F a → a, т.е. тип, который можно применять к себе. А значит можем написать \x → x x как \(F f) → f (F f)), а полный Y-комбинатор как
y = (\(F f) → f (F f)) (F (\(F f) → f (F f)))

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