stackOf

inline fun <T> stackOf(): Stack<T>

Return an empty new Stack.

Since

1.1.0


inline fun <T> stackOf(vararg elements: T): Stack<T>

Returns a Stack of given elements.

Since

1.1.0


fun stackOf(range: IntRange): Stack<Int>

Return an integer Stack from int range.

Example:

stackOf(1..10) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Since

1.1.0


fun stackOf(range: UIntRange): Stack<UInt>

Return an un-sign integer Stack from un-sign int range.

Example:

stackOf(1u..10u) // [1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u]

Since

1.1.0


fun stackOf(range: LongRange): Stack<Long>

Return a long Stack from long range.

Example:

stackOf(1..10L) // [1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L]

Since

1.1.0


fun stackOf(range: ULongRange): Stack<ULong>

Return an un-sign long Stack from un-sign long range.

Example:

stackOf(1uL..10uL) // [1ul, 2uL, 3uL, 4uL, 5uL, 6uL, 7uL, 8uL, 9uL, 10uL]

Since

1.1.0


fun stackOf(progression: IntProgression): Stack<Int>

Return an integer Stack from int progression.

Example:

stackOf(1..10 step 2) // [1, 3, 5, 7, 9]

Since

1.1.0


fun stackOf(progression: UIntProgression): Stack<UInt>

Return an un-sign integer Stack from un-sign int progression.

Example:

stackOf(1u..10u step 2) // [1u, 3u, 5u, 7u, 9u]

Since

1.1.0


fun stackOf(progression: LongProgression): Stack<Long>

Return a long Stack from long progression.

Example:

stackOf(1..10L step 2) // [1L, 3L, 5L, 7L, 9L]

Since

1.1.0


fun stackOf(progression: ULongProgression): Stack<ULong>

Return an un-sign long Stack from un-sign long progression.

Example:

stackOf(1uL..10uL step 2) // [1ul, 3uL, 5uL, 7uL, 9uL]

Since

1.1.0


fun stackOf(range: CharRange): Stack<Char>

Return a char Stack from char range.

Example:

stackOf('a'..'f') // ['a', 'b', 'c', 'd', 'e', 'f']

Since

1.1.0


fun stackOf(progression: CharProgression): Stack<Char>

Return a char Stack from char progression.

Example:

stackOf('a'..'f' step 2) // ['a', 'c', 'e']

Since

1.1.0