Ethiopian multiplication: Difference between revisions

→‎{{header|Haskell}}: 'odd' although included in the Prelude, it is defined here to meet the task specification as: (UNTESTED MOD)
(→‎{{header|Haskell}}: Replaced with an implementation much like the second, but which I believe to be a more literal translation of the task description.)
(→‎{{header|Haskell}}: 'odd' although included in the Prelude, it is defined here to meet the task specification as: (UNTESTED MOD))
Line 636:
halve = (`div` 2)
double = (2 *)
-- 'odd' isalthough included in the Prelude., Itit could beis defined byhere to meet the task specification as:
-- odd = (== 1) . (`mod` 2)
 
ethiopicmult :: Integral a => a -> a -> a
Anonymous user