const keywords for variable definition.
let defines an allocated program variable.
const defines a constant program variable.
allocated variables define private variables in the constraint system. Their value is constrained in the circuit on initialization.
constant variables do not define a variable in the constraint system. Their value is constrained in the circuit on computation with an allocated variable.
constant variables cannot be mutable. They have the same functionality as
const variables in other languages.
Computations are expressed in terms of arithmetic R1CS circuits. Thus computing on an allocated variable always results in another allocated variable.
const variables in Leo are immutable - they cannot be changed after assignment.
let variables in Leo are mutable - they can be changed after assignment.
Mutable functionality does not persist across scopes since Leo variables are pass by value.