Created
August 26, 2019 00:53
-
-
Save dmwit/062f38fa6898e4c009b0aa381bf7949d 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
> mapM_ (print . pretty) $ runInfer (SourceApp (SourceApp (SourceVar "plus") (SourceVar "readLn")) (SourceVar "readLn")) | |
let appPMPPM f x = pure (f (pure x)) | |
appMaMaM f x = f >>= ($x) | |
appMMMPM f x = f >>= ($pure x) | |
appMPMMM f x = f >>= (x>>=) | |
appMaPaM f x = fmap ($x) f | |
appMMPPM f x = fmap ($pure x) f | |
in | |
(<*>) (fmap plus readLn) readLn | |
:: m _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment