blob: 6d26dc5607a8242f59bbe8408cbed83cb47260be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- Tests transform WITH a by clause
{-# OPTIONS_GHC -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]
|