immutequality: Use Equality Assignment for Immutability

Description Details Author(s)

Description

This package overloads the `=` operator with the immutequality operator. It associates a value with a symbol, which can then subsequently be treated equal to the value for the remainder of the scope. This "immutability" is emulated by assigning an active binding to the symbol. If the value is accessed, it is simply returned by the active binding, but if a value change is attempted, an error is raised that the symbol cannot be reused. The immutequality operator can thus be used to promise that the value associated with a symbol will not change for the remainder of its scope.

Details

Immutequality

Author(s)

Stefan Milton Bache <stefan@stefanbache.dk>


smbache/immutequality documentation built on May 30, 2019, 5:01 a.m.