Control Flow
If Statements
#![allow(unused)] fn main() { fn min(a: Felt, b: Felt) -> Felt { if a < b { a } else { b } } }
While Loops
fn main() -> Felt { let mut res: Felt = 0; let mut i: Felt = 0; while i < 10 { res += i; i += 1; } res }
Match Expressions
#![allow(unused)] fn main() { fn match_test_case(input: Felt) -> Felt { match input { 0 => 10, 1 => 20, _ => 30, } } }