moduleEvenOddexposing(evenOdd)compareEvensOdds:(Int,Int)->StringcompareEvensOdds(evens,odds)=casecompareevensoddsofGT->"Even is greater than Odd"LT->"Odd is greater than Even"_->"Even and Odd are the same"evenOdd:String->StringevenOdd=String.split"">>List.map(String.toInt>>Maybe.withDefault0)>>List.partition(modBy2>>(==)0)>>Tuple.mapBothList.sumList.sum>>compareEvensOdds

Tests

moduleEvenOddTestexposing(suite)importEvenOddexposing(evenOdd)importExpectexposing(equal)importTestexposing(Test,describe,test)suite:Testsuite=describe"Even or odd"[test"Evens should be greater than odds with 12"<|\_->evenOdd"12"|>equal"Even is greater than Odd",test"Odds should be greater than evens with 123"<|\_->evenOdd"123"|>equal"Odd is greater than Even",test"Evens & odds should be equal with 112"<|\_->evenOdd"112"|>equal"Even and Odd are the same"]

## re: Daily Challenge #81 - Even or Odd VIEW POST

FULL DISCUSSIONElmTests