repl.it
@Andrewnetwork/

What is a Monad in Haskell?

Haskell

https://andrewnetwork.github.io/lamb-the-lambda/haskell/basic/2019/09/06/monad.html

fork
loading
Files
  • main.hs
main.hs
1
2
3
4
5
6
7
8
9
10
{-
  What is a Monad in Haskell?
  Andrew Ribeiro 
  September 2019
-}

main = print $ 
  [34,2,3,14] 
    >>= 
      \x -> if x > 10 then [x] else []
GHCi, version 8.6.5