lean4-htt/tests/lean/run/whenIO.lean

8 lines
180 B
Text

import system.io
open io
def iowhen (b : bool) (a : io unit) : io unit :=
if b = tt then a else return ()
#eval iowhen tt (put_str "hello\n")
#eval iowhen ff (put_str "error\n")