--- the functions here should be eventually put in the stdlib
module Data.Tmp;

import ContainersPrelude open;

printNatListLn : List Nat  IO
  | nil := printStringLn "nil"
  | (x :: xs) := printNat x >> printString " :: " >> printNatListLn xs;

mapMaybe {A B} (f : A -> B) : Maybe A -> Maybe B
  | nothing := nothing
  | (just a) := just (f a);

isJust {A} : Maybe A -> Bool
  | nothing := false
  | (just _) := true;
Last modified on 2023-12-07 10:36 UTC