Skip to content

Commit fa2b1c7

Browse files
committed
Set 2a Ex 2: test case n > length xs
fixes #18
1 parent 37bdae8 commit fa2b1c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/Set2aTest.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ ex2_takeFinal_1 = property $ do
4646

4747
ex2_takeFinal_2 = property $ do
4848
n <- choose (0,20)
49-
k <- choose (0,n)
49+
k <- choose (0,20)
5050
let inp = reverse [0..n]
51-
return $ $(testing [|takeFinal k inp|]) (?== reverse [0..k-1])
51+
return $ $(testing [|takeFinal k inp|]) (?== reverse [0..min (k-1) n])
5252

5353
ex3_updateAt = property $ do
5454
ws <- listOf1 word

0 commit comments

Comments
 (0)