Package-level declarations
Types
Just as in Scala3, we provide the EmptyTuple. It is the result of dropping the last item from a Tuple1 or when calling tupleOf()
for instance.
Properties
This file provides the functions yourTuple.first()
and yourTuple.last()
to access the value you require.
Functions
This file provides functions to easily extend Scala Tuples.
Converts this product to an Any?
iterable.
Returns this product as an iterable of type T.
This file provides the operator functions to destructuring for Scala classes implementing ProductX, like Tuples.
This file provides functions to easily merge two separate tuples into one.
This file contains all functions to drop N items from the beginning or end of a Tuple. If all items are dropped, the result will be EmptyTuple.
Returns the first value of this Tuple or Product.
The n'th element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
.
The range of n'th elements of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
.
The n'th element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
. The result is cast to the given type T.
The range of n'th elements of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
. The results are cast to the given type T.
The n'th element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
. The result is cast to the given type T.
The range of n'th elements of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
. The results are cast to the given type T.
The n'th element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
.
The range of n'th elements of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,)
, returns x,,(n+1),,
where 0 <= n < k
.
An iterator over all the elements of this product.
Allows this product to be iterated over. Returns an iterator of type T.
Returns the last value of this Tuple or Product.
This file provides map-functions to all Tuple variants. Given a tuple t(a1, ..., an)
, returns a new tuple t(func(a1), ..., func(an))
. Compared to Scala 3, no type mapping can occur in Kotlin, so to create a TupleX<T1, T2, ...>
the user will need to explicitly cast the result.
Given a tuple t(a1, ..., am)
, returns a Tuple2 of the tuple t(a1, ..., an)
consisting of the first n elements, and the tuple t(an+1, ..., am)
consisting of the remaining elements. Splitting at 0 or at n results in t(t(), myTuple)
or t(myTuple, t())
respectively.
Returns the instance of Tuple0.
Returns a new Tuple1 of the given arguments.
Returns a new Tuple2 of the given arguments.
Returns a new Tuple3 of the given arguments.
Returns a new Tuple4 of the given arguments.
Returns a new Tuple5 of the given arguments.
Returns a new Tuple6 of the given arguments.
Returns a new Tuple7 of the given arguments.
Returns a new Tuple8 of the given arguments.
Returns a new Tuple9 of the given arguments.
Returns a new Tuple10 of the given arguments.
Returns a new Tuple11 of the given arguments.
Returns a new Tuple12 of the given arguments.
Returns a new Tuple13 of the given arguments.
Returns a new Tuple14 of the given arguments.
Returns a new Tuple15 of the given arguments.
Returns a new Tuple16 of the given arguments.
Returns a new Tuple17 of the given arguments.
Returns a new Tuple18 of the given arguments.
Returns a new Tuple19 of the given arguments.
Returns a new Tuple20 of the given arguments.
Returns a new Tuple21 of the given arguments.
Returns a new Tuple22 of the given arguments.
This file contains all functions to take N items from the beginning or end of a Tuple. If 0 items are taken, the result will be EmptyTuple.
Returns list of type T for this product.
Returns the instance of Tuple0.
Returns a new Tuple1 of the given arguments.
Returns a new Tuple2 of the given arguments.
Returns a new Tuple3 of the given arguments.
Returns a new Tuple4 of the given arguments.
Returns a new Tuple5 of the given arguments.
Returns a new Tuple6 of the given arguments.
Returns a new Tuple7 of the given arguments.
Returns a new Tuple8 of the given arguments.
Returns a new Tuple9 of the given arguments.
Returns a new Tuple10 of the given arguments.
Returns a new Tuple11 of the given arguments.
Returns a new Tuple12 of the given arguments.
Returns a new Tuple13 of the given arguments.
Returns a new Tuple14 of the given arguments.
Returns a new Tuple15 of the given arguments.
Returns a new Tuple16 of the given arguments.
Returns a new Tuple17 of the given arguments.
Returns a new Tuple18 of the given arguments.
Returns a new Tuple19 of the given arguments.
Returns a new Tuple20 of the given arguments.
Returns a new Tuple21 of the given arguments.
Returns a new Tuple22 of the given arguments.
Returns a new Tuple2 of the given arguments.
This file provides zip-functions to all Tuple variants. Given two tuples, t(a1, ..., an) zip t(a1, ..., an)
, returns a tuple t(t(a1, b1), ..., t(an, bn))
. If the two tuples have different sizes, the extra elements of the larger tuple will be disregarded. The result is typed as TupleX<Tuple2<TA1, TB1>, ..., Tuple2<TAn, TBn>>
.