Last active
April 20, 2017 07:57
-
-
Save pb10005/923bab7cd255cd91934989e1b66c182e to your computer and use it in GitHub Desktop.
This file contains 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
--Haskellでラムダ | |
--syntax sugar | |
mul = \x y -> x * y | |
mul' = \x -> \y -> x * y | |
main = do | |
--束縛せずに書ける | |
print $ (\x -> \y -> x*y) 4 5 | |
--カリー化 | |
print $ mul 4 5 | |
print $ mul' 4 5 | |
print $ (mul 4) 5 | |
print $ (mul' 4) 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment