lean4-htt/tests/lean/doIfLet.lean
2022-06-29 13:30:06 -07:00

15 lines
220 B
Text

#eval Id.run do
let mut x := 2
if let n + 1 := x then
x := n
return x
#eval Id.run do
let mut x := 2
if let 0 := x then
x := 0
else if let n + 1 := x then
x := n
else
x := x + 1
return x