Created
August 11, 2014 06:53
-
-
Save nobsun/bfc1f88e1562ac0f51f5 to your computer and use it in GitHub Desktop.
Haskellプログラミングのコツのようなもの(その2) ref: http://qiita.com/nobsun/items/c16417fdecd7f5c2f9fa
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
| f . g $ x ≡ f $ g $ x -- (1) |
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
| $ ghci -v0↲ | |
| Prelude> :type ($)↲ | |
| ($) :: (a -> b) -> a -> b | |
| Prelude> :type (.) | |
| (.) :: (b -> c) -> (a -> b) -> a -> c |
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
| (.) :: (b -> c) -> (a -> b) -> a -> c | |
| (f . g) x = f (g x) |
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
| (f . g) $ x = f $ (g $ x) |
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
| f . g $ x = f $ g $ x |
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
| main = getContents >>= putStr . gonyo |
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
| interact f = getContents >>= putStr . f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment