Infix trick
メモ。Haskell-Cafeより。
infixr 0 -:, :- data Infix f y = f :- y x -:f:- y = x `f` y main = print $ [1,2,3] -: zipWith (+) :- [4,5,6]
http://www.haskell.org/pipermail/haskell-cafe/2002-July/003215.html
メモ。Haskell-Cafeより。
infixr 0 -:, :- data Infix f y = f :- y x -:f:- y = x `f` y main = print $ [1,2,3] -: zipWith (+) :- [4,5,6]
http://www.haskell.org/pipermail/haskell-cafe/2002-July/003215.html