▲ | javcasas 5 days ago | |
`let` defines a value. Some values are "plain old values", some are functions. The syntax is `let <constantname> <parameters> = <value> in <expression>;;` where `expression` can also have `let` bindings. So you can have
| ||
▲ | jallmann 5 days ago | parent [-] | |
The way I always think about it is in terms of scope. With:
`x` is now available for use in `expr`In essence, an OCaml program is a giant recursive expression, because `expr` can have its own set of let definitions. In the REPL, this is where the double semicolons come in, as a sort of hint to continue processing after the expression. |