her.esy.fun/src/posts/0010-Haskell-Now/monad_composition.hs
Yann Esposito (Yogsototh) 3f403f946b
Progress
2019-12-26 17:27:19 +01:00

10 lines
144 B
Haskell

import Control.Monad ((>=>))
f :: Int -> [Int]
f n = [n, n+1]
g :: Int -> [String]
g n = [show n,">"++show (n+1)]
main = print $ (f >=> g) 2