LazyMemoizerSignature

turbolift.effects.LazyMemoizerSignature
trait LazyMemoizerSignature[K, V] extends Signature

Memoizes a recursive, effectful, lazy function.

Like the Memoizer effect, but this version can be used to build or transform cyclic data structures.

The price to pay is that that memo returns a thunk. The constructor of the cyclic data structure should store obtained thunks, rather than attempt to call them.

Calling obtained thunks BEFORE this effect is handled, may raise TieTheKnot exception and should be considered a defect.

Attributes

Graph
Supertypes
trait Signature
class Object
trait Matchable
class Any
Known subtypes
trait LazyMemoizerEffect[K, V]
trait LazyMemoizer[K, V]

Members list

Type members

Inherited and Abstract types

type ThisEffect

Self-reference to the effect being described by this Signature.

Self-reference to the effect being described by this Signature.

Becomes an alias of this.type, once the signature is inherited from Effect.

Attributes

Inherited from:
Signature

Value members

Abstract methods

def domain: Computation[Set[K], ThisEffect]
def memo(k: K): Computation[() => V, ThisEffect]
def toMap: Computation[Map[K, V], ThisEffect]