Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
djtrack16 committed Aug 31, 2024
1 parent 1dd0138 commit e0a1170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haskell/app/arithmetic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module Arithmetic where
goldbachNumbers :: Int -> [Int]
goldbachNumbers n = let pairs = filter (\m -> isPrime m && isPrime (n - m)) [2..n]
m = if null pairs then 0 else m
in if m > 0 then [] else [m, n - m]
in if m == 0 then [] else [m, n - m]

-- P41 (**) A list of Goldbach compositions.
-- Given a range of integers by its lower and upper limit, print a list of all even numbers and their Goldbach composition.
Expand Down

0 comments on commit e0a1170

Please sign in to comment.