Idris2/libs/base/Data/Integral.idr

10 lines
155 B
Idris

module Data.Integral
export
even : Integral n => Eq n => n -> Bool
even n = n `mod` 2 == 0
export
odd : Integral n => Eq n => n -> Bool
odd = not . even