Skip to content

Commit

Permalink
slightly more defined
Browse files Browse the repository at this point in the history
  • Loading branch information
glguy committed Dec 9, 2023
1 parent 15b907e commit f4eaea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/src/2023/09.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ nextInSequence :: [Int] -> Int
nextInSequence = sum . map last . takeWhile (any (0 /=)) . iterate differences

differences :: [Int] -> [Int]
differences xs = zipWith (-) (tail xs) xs
differences xs = zipWith subtract xs (tail xs)

0 comments on commit f4eaea1

Please sign in to comment.