Cons
scalus.uplc.builtin.BuiltinList.Cons
final case class Cons[+A](h: A, tl: BuiltinList[A]) extends BuiltinList[A]
Members list
Value members
Inherited methods
Prepends an element to the list.
Prepends an element to the list.
Corresponds to UPLC builtin mkCons.
Value parameters
- x
-
the element to prepend
Attributes
- Returns
-
a new list with x as the first element
- Inherited from:
- BuiltinList
Returns the first element of the list.
Returns the first element of the list.
Corresponds to UPLC builtin headList.
Attributes
- Returns
-
the first element
- Throws
-
NoSuchElementException
if the list is empty
- Inherited from:
- BuiltinList
Checks if the list is empty.
Checks if the list is empty.
Corresponds to UPLC builtin nullList.
Attributes
- Returns
-
true if the list has no elements
- Inherited from:
- BuiltinList
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Returns all elements except the first.
Returns all elements except the first.
Corresponds to UPLC builtin tailList.
Attributes
- Returns
-
a new list without the first element
- Throws
-
NoSuchElementException
if the list is empty
- Inherited from:
- BuiltinList
Converts to a Scala immutable List.
Converts to a Scala immutable List.
This is an offchain operation for interoperability with Scala collections.
Attributes
- Inherited from:
- BuiltinList
In this article