Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

handles2

handles2

handles2 provide a means to create handles that refer to update-able
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.

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'
§return(B 
type
, w handles2.return.B)
 => 
handles2 handles2.T handles2.return.B
:
Any 
has one element been created using 'new'?
create a new instance with the value refered to by a given handle read and
updated.

redefines: