-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Fast return conditions #88
Open
Description
Allow for a faster way of writing conditions for ret statements.
For example:
func main() s32 {
var s32 myInt = ...;
ret myInt [x -> x > 64]
}
This will return myInt only if the condition defined on the label x is true. If the condition fails, the function will continue as normal. Additionally, the binding name can be skipped as it is x by default:
func main() s32 {
var s32 myInt = ...;
ret myInt [x > 64]
}