Skip to content

Commit

Permalink
add tests for list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed May 20, 2017
1 parent 49f392f commit c39e23e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/list/comprehension_multi_line2.in.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
z = (x, y)
where x = [ n * n
| n <- [1..]
, odd n
, isPrime n ]
y = [ n * n
| n <- [1..]
, even n
, isPrime (n `div` 2) ]
9 changes: 9 additions & 0 deletions test/list/comprehension_multi_line2.out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
z = (x, y)
where x = [ n * n
| n <- [1..]
, odd n
, isPrime n ]
y = [ n * n
| n <- [1..]
, even n
, isPrime (n `div` 2) ]

0 comments on commit c39e23e

Please sign in to comment.