lean4-htt/tests/compiler/strictOrSimp.lean
2019-04-05 16:58:47 -07:00

11 lines
223 B
Text

partial def spin : Nat → Bool
| n := spin (n)
@[inline] def C : Nat := 0
def f (b : Nat) :=
if strictOr (C == 0) (spin b) then "hello"
else "world"
def main (xs : List String) : IO Unit :=
IO.println (f xs.head.toNat)