class

Pf::Map::Commit(K, V)

Inherits Reference / Object

Commits allow you to compose multiple edits into one, big edit of the map. Thus you avoid creating many useless intermediate copies of the map.

Instance methods

[](key : K) : V

Runs Map#[] on the map built so far.

Source
[]?(key : K) : V | Nil

Runs Map#[]? on the map built so far.

Source
assoc(key : K, value : V) : self

Commits the association between key and value to the map.

Raises ResolvedError if this commit is used outside of the transaction (see Map#transaction) that produced it.

Raises ReadonlyError if called by a fiber other than the fiber that initiated the transaction.

Source
dissoc(key : K) : self

Commits the removal of an association between key and value from the map.

Raises ResolvedError if this commit is used outside of the transaction (see Map#transaction) that produced it.

Raises ReadonlyError if called by a fiber other than the fiber that initiated the transaction.

Source
includes?(object) : Bool

Runs Map#includes? on the map built so far.

Source
size

Runs Map#size on the map built so far.

Source