80. カリー化関数を表示?
• カリー化された関数は(基本的に)表示できない
• letで名前をつけたり引数として渡す必要がある
ghci> max 9
<interactive>:2:1:
No instance for (Show (a0 -> a0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In the first argument of ‘print’, namely ‘it’
In a stmt of an interactive GHCi command: print it
87. filterの例
• リストのうち3より大きいものだけを残す
• 文字列のうち大文字だけを残す
ghci> filter (>3) [1,5,3,2,7,6,8,2]
[5,7,6,8]
ghci> filter (`elem` ['A'..'Z']) "The Answer to The
Ultimate Question of Life, The Universe, and Everything"
"TATUQLTUE"