Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Givens
Givens
Extensions
Extensions
Returns the first element of this PairList.
Returns the first element of this PairList.
Attributes
- Returns
-
The first key-value pair.
- Throws
-
NoSuchElementException
If the
PairListis empty. - Example
-
PairList.single("a", 1).head === ("a", 1)
Maps values while keeping keys unchanged.
Maps values while keeping keys unchanged.
On-chain this is significantly cheaper than List.map on tuples because it uses fstPair/sndPair builtins directly (~4 ops/element vs ~12).
Attributes
Returns all elements except the first.
Returns all elements except the first.
Attributes
- Returns
-
The tail of the
PairList. - Throws
-
NoSuchElementException
If the
PairListis empty.
Converts this PairList to a List[(A, B)].
Converts this PairList to a List[(A, B)].
On-chain this is a zero-cost operation (noop in UPLC) because both types share the same SumDataPairList representation.
Attributes
Converts this PairList to an AssocMap without validation. On-chain this is just mapData — no per-element conversion.
Converts this PairList to an AssocMap without validation. On-chain this is just mapData — no per-element conversion.
Attributes
Converts this PairList to a SortedMap without validation. On-chain this is just mapData — no per-element conversion.
Converts this PairList to a SortedMap without validation. On-chain this is just mapData — no per-element conversion.
Attributes
Converts a List[(A, B)] to a PairList[A, B].
Converts a List[(A, B)] to a PairList[A, B].
On-chain this is a zero-cost operation (noop in UPLC) because both types share the same SumDataPairList representation.