Memo
public enum Memo<T> : Equatable where T : Equatable
extension Memo: Hashable where T: Hashable
extension Memo: Sendable where T: Sendable
The state of memoization of a computation, including an “in progress” state that allows us to detect cycles.
-
Computation is in progress.
Declaration
Swift
case inProgress -
Result has been computed and stored in the payload.
Declaration
Swift
case computed(T) -
The payload of the
.computedcase, if any, ornilifself == .inProgress.Declaration
Swift
public var computed: T? { get }
View on GitHub