OCaml Mutable record fields Setting the value to a mutable field


Example

To assign a new value to a mutable record field, use the <- operator.

john.weight <- 120;;

Note: The previous expression has a unit type.