getAs

inline fun <T> Product.getAs(n: Int): 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.

Return

the element n elements after the first element

Parameters

n

the index of the element to return

Throws


inline fun <T> Product.getAs(indexRange: IntRange): List<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.

Return

the elements in indexRange

Parameters

indexRange

the indices of the elements to return

Throws