☰
handles2
handles2
Functions
create a new instance with new value refered to by a given handle
get the value refered to by a given handle
return the last handle that was created by 'new'
create a new instance with one additional handle
the new handle can be accessed by 'result.last'
the new handle can be accessed by 'result.last'
create a new instance with the value refered to by a given handle read and
updated.
updated.
cells.
handles is a state monad. It provides features to create several
handles that refer to modifiable value and features to 'get', 'put' or
'update' this value.
For performance, this implementation uses mutable state. It can consequently
only be used as a one-way monad.