Skip to content

Commit 0af2c48

Browse files
committed
Update destructuring for chapter 5 nested comprehension function, closes #2
1 parent 5da0f8b commit 0af2c48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

05-list-comprehensions/05.7-exercises.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ perfects n = [x | x <- [1..n], sum (factors x) - x == x]
3333
-- Show how the list comprehension [(x, y) | x <- [1, 2], y <- [3, 4]] with two generators can be
3434
-- expressed using two comprehensions with a single generator
3535

36-
nestedComprehension xs ys = concat [[(x, y) | x <- xs] | y <- ys]
36+
nestedComprehension xs ys = concat [[(x, y) | y <- ys] | x <- xs]
3737

3838
-- 8.
3939
-- Redefine the function `positions` using the function `find`

0 commit comments

Comments
 (0)