aboutsummaryrefslogtreecommitdiff
path: root/src/Lib.hs
blob: 106a981b6d69ae4975c7bb0e851e3e574a294d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Lib
  ( isCongruent
  , zipWithSum
  ) where

isCongruent :: Int -> Int -> Int -> Bool
isCongruent a b m = (a `mod` m) == (b `mod` m)

zipWithSum :: [Int] -> [Int] -> [Int]
zipWithSum [] ys = ys
zipWithSum xs [] = xs
zipWithSum (x:xs) (y:ys) = (x + y) : zipWithSum xs ys