Returning values
Like in Rust, you can return a value either by writing a return
statement:
let a = 5
return a //Returns 5
return 5 //Returns 5
... Or, if the last statement yields a value, it also returns it like in Rust:
let a = 5
let b = 0
a //Returns 5
a = 10
5 //Returns 5