Gjallarhorn


Mutable

Namespace: Gjallarhorn

Manages creation of mutable variables

Functions and values

Function or valueDescription
create value
Signature: value:'a -> IMutatable<'a>
Type parameters: 'a

Create a mutable variable wrapping an initial value

createAsync value
Signature: value:'a -> IAsyncMutatable<'a>
Type parameters: 'a

Create an asynchronous mutable variable wrapping an initial value

createThreadsafe value
Signature: value:'a -> IAtomicMutatable<'a>
Type parameters: 'a

Create a threadsafe mutable variable wrapping an initial value

get mutatable
Signature: mutatable:IMutatable<'a> -> 'a
Type parameters: 'a

Gets the value associated with the mutatable object

set mutatable value
Signature: mutatable:IMutatable<'a> -> value:'a -> unit
Type parameters: 'a

Sets the value associated with the mutatable object

step f mutatable
Signature: f:('a -> 'a) -> mutatable:IMutatable<'a> -> unit
Type parameters: 'a

Updates the value associated with the mutatable object via a function that takes the original value

Fork me on GitHub