diff --git a/examples/8_control_flow.leek b/examples/8_control_flow.leek new file mode 100644 index 0000000..b15e53e --- /dev/null +++ b/examples/8_control_flow.leek @@ -0,0 +1,10 @@ +fn main() { + leak a = 69 + leak b = 420 + + if a > b { + println("a is greater") + } else { + println("b is greater") + } +} \ No newline at end of file diff --git a/examples/9_guard.leek b/examples/9_guard.leek new file mode 100644 index 0000000..b97ef56 --- /dev/null +++ b/examples/9_guard.leek @@ -0,0 +1,7 @@ +fn div(a: i32, b: i32) -> i32? { + unless b != 0 { + yeet None + } + + yeet a / b +} \ No newline at end of file