ref: 6cf4c416de254582a67b0c5e5932847f03b0be21
parent: b7c1f531cc5f0bf95cbcfae20ef735c015e21f79
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Tue Feb 6 13:26:02 EST 2024
More tests
--- a/tests/ListCompr.hs
+++ b/tests/ListCompr.hs
@@ -8,6 +8,9 @@
print [ x | x <- [1..3], odd x ]
print [ x+1 | x <- [1..3] ]
print [ (x,y) | x <- [1..3], y <- [1,2] ]
+ print [ (x,y) | x <- [1..3], y <- [1..x] ]
print $ [ x | x <- [1..3] ] ++ [ x | x <- [1..4] ]
print [ [ x + y | y <- [1,2] ] | x <- [1..3] ]
print [ x+1 | x <- [ a+b | a <- [1,10,100], b <- [2,3] ], even x ]
+ let lst = [((==5), "5"), (const True, "def")]
+ print [ s | (p, s) <- lst, p 5 ]
--- a/tests/ListCompr.ref
+++ b/tests/ListCompr.ref
@@ -2,6 +2,8 @@
[1,3]
[2,3,4]
[(1,1),(1,2),(2,1),(2,2),(3,1),(3,2)]
+[(1,1),(2,1),(2,2),(3,1),(3,2),(3,3)]
[1,2,3,1,2,3,4]
[[2,3],[3,4],[4,5]]
[5,13,103]
+["5","def"]
--
⑨