klyn.collections.Generator.current
property
public abstract readonly property current as T
Description

Reads the current element without advancing the generator.

Returns

The value produced by the last successful next().

Throws
  • IllegalStateException before the first element, after completion or after close.
Example

if values.next(): print(values.current)