Skip to content

Commit fcb5e3d

Browse files
committed
p2 example
1 parent 58566c4 commit fcb5e3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

05.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ xsmin xs = foldl1 min xs
7474

7575
p2 al = p1 $ al { seeds = expand (seeds al) }
7676

77-
expand seeds = seeds
77+
expand :: [Int] -> [Int]
78+
expand [] = []
79+
expand (x:y:zs) = concat [[x..(x+y)], expand zs]

0 commit comments

Comments
 (0)