List¶
List is a structure that contains ordered elements of type T
The interface¶
For a list parametrised over the element type T:
new() -> List- creates an empty listsize(Set) -> Nat- returns the number of elements in the listelem(List, Nat) -> T- returns an element from the list at the given positionappend(List, T) -> List- appends an element to the listdelete(List, Nat) -> List- removes an element at the given position from the listcontains(List, T) -> Bool- checks if an element is in the list
Used in¶
- Action (commitments, nullifiers)
- Compliance unit