-
-
Save LSLeary/4c7f3ab7622d991cfa22c36efbaf0674 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BlockArguments #-} | |
module Y where | |
newtype Y a = Y { ($$) :: Y a -> a } | |
{-# NOINLINE y #-} | |
y :: (a -> a) -> Y a | |
y f = Y \x -> f (x $$ x) | |
yfix :: (a -> a) -> a | |
yfix f = y f $$ y f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment