Anoma abstract resource machine - 0.0.0

Anoma.Resource

Definitions

type ResourceSource#

A Resource is an immutable object that represents part of an application's state.

kind (r : Resource) : KindSource#

Extract the data which determines the Resource's fungibility.

resourcesForKind (d : Kind) (rs : List Resource) : List ResourceSource#

Find all the resources associated with a kind

quantityOfKind (d : Kind) (rs : List Resource) : IntSource#

Aggregate the quantities associated with a kind

zeroOrOneCheck (p : Resource -> Bool) : List Resource -> BoolSource#

Return true if the list is empty or the list has exactly 1 element and the predicate is satisfied

Constructors

| created
| consumed