[ create a new paste ] login | about

Link: http://codepad.org/iUe8I2lN    [ raw code | output | fork ]

azumih - Haskell, pasted on Dec 15:
1
2
3
4
5
6
7
8
-- list monad...
ppp = do
  x <- [1, 2, 3]
  y <- [1, 2, 3]
  True <- return (x /= y)
  return (x, y)

main = print ppp


Output:
1
[(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)]


Create a new paste based on this one


Comments: