Is there a way to apply one argument to multiple functions in elm?
in the example, x would be applied to each isDiv function
isDiv : Int -> Int -> Bool
isDiv x y =
modBy x y == 0
isLeapYear : Int -> Bool
isLeapYear x =
x (isDiv 4 && isDiv 100 || isDiv 400)
Ended up doing this
isLeapYear : Int -> Bool
isLeapYear x =
let
isDiv y =
modBy y x == 0
in
isDiv 4 && not (isDiv 100) || isDiv 400