Skip to content

Poperator[T: T]

[Source]

Iterate over a Seq descructively by poping its elements.

Once has_next() returns false, the Seq is empty.

Nominee for the annual pony class-naming awards.

class ref Poperator[T: T] is
  Iterator[T^] ref

Implements


Constructors

create

[Source]

new ref create(
  seq: Seq[T] ref)
: Poperator[T] ref^

Parameters

  • seq: Seq[T] ref

Returns


empty

[Source]

new ref empty()
: Poperator[T] ref^

Returns


Public Functions

has_next

[Source]

fun ref has_next()
: Bool val

Returns


next

[Source]

fun ref next()
: T^ ?

Returns

  • T^ ?