diff --git a/dummy.do b/dummy.do index 6c7f0c0..2392432 100644 --- a/dummy.do +++ b/dummy.do @@ -3,9 +3,8 @@ // This is a function. It can be called with the call operator. // The function called `main` is the program's entrypoint -// fn main() -> (&str, bool, i128) -const main = fn () { +fn main() /*-> (&str, bool, i128)*/ { // An if expression is like the ternary conditional operator in C let y = if 10 < 50 { "\u{1f988}" @@ -34,10 +33,10 @@ const main = fn () { // desugars to { - let _pass = || if idx > 2 * 2 { break idx }; - let _body = || { 12345 }; let _it = 0..100; - loop if let idx = _it.next() _pass() else _fail() + loop if let idx = _it.next() { + if idx > 2 * 2 { break idx } + } else break { 12345 } };