module Input; open import Prelude; odd : Nat → Bool; even : Nat → Bool; odd zero ≔ false; odd (suc n) ≔ even n; even zero ≔ true; even (suc n) ≔ odd n; check : (Nat → Bool) → Int → String; check f x ≔ (boolToStr (f (intToNat x))); checkEven : Int → String; checkEven ≔ check even; checkOdd : Int → String; checkOdd ≔ check odd; main : Action; main ≔ put-str "even 1: " >> put-str-ln (checkEven 1) >> put-str "even 4: " >> put-str-ln (checkEven 4) >> put-str "even 9: " >> put-str-ln (checkEven 9) >> put-str "odd 1: " >> put-str-ln (checkOdd 1) >> put-str "odd 4: " >> put-str-ln (checkOdd 4) >> put-str "odd 9: " >> put-str-ln (checkOdd 9) end;