List comprehensions: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: (>>=) is flip concatMap) |
|||
Line 849: | Line 849: | ||
False -> empty</lang> |
False -> empty</lang> |
||
which can be further specialised (given the particular context of the list monad, in which (>>=) is concatMap, pure is flip (:) [], and empty is []) to: |
which can be further specialised (given the particular context of the list monad, in which (>>=) is flip concatMap, pure is flip (:) [], and empty is []) to: |
||
<lang haskell>pyth :: Int -> [(Int, Int, Int)] |
<lang haskell>pyth :: Int -> [(Int, Int, Int)] |