blob: 7726dedb6529c4e70d657f772030e595d5886e84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- Tests transform WITH a by clause
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module Main where
import Data.List(takeWhile)
main = putStrLn (show output)
where
output = [ (x * 10) + y
| x <- [1..4]
, y <- [1..4]
, then takeWhile by (x + y) < 4]
|