PistonDevelopers / dyon

A rusty dynamically typed scripting language
Apache License 2.0
1.77k stars 55 forks source link

Allow `grab` inside `vec4` un-loops #719

Closed bvssvni closed 1 year ago

bvssvni commented 1 year ago
fn main() {
    // Prints `\(a: vec4) = (s(a, 1), s(a, 2), s(a, 0), s(a, 3))`.
    println(\(a: vec4) = vec4 i s(a, grab if i == 3 { i } else { (i+1)%3 }))
}