lean4-htt/tests/lean/run/whenIO.lean
2017-03-09 18:41:19 -08:00

7 lines
179 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")