中置関数
map とかって、中置で使うとOO系言語と逆になるんだよなぁ・・
> :info map map :: (a -> b) -> [a] -> [b] -- Defined in GHC.Base > (\x -> x + 1) `map` [1..10] [2,3,4,5,6,7,8,9,10,11] > succ `map` [1..10] [2,3,4,5,6,7,8,9,10,11] > let myMap a b = map b a > [1..10] `myMap` (\x -> x + 1) [2,3,4,5,6,7,8,9,10,11] > [1..10] `myMap` succ [2,3,4,5,6,7,8,9,10,11]
意味的には、「関数 map リスト」の方が合ってるのか・・・?