# Poperator\[T: T\]
<span class="source-link">[[Source]](src/pony_check/poperator.md#L-0-1)</span>

Iterate over a [Seq](builtin-Seq.md) descructively by `pop`ing its elements.

Once `has_next()` returns `false`, the [Seq](builtin-Seq.md) is empty.

Nominee for the annual pony class-naming awards.


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

#### Implements

* [Iterator](builtin-Iterator.md)\[T^\] ref

---

## Constructors

### create
<span class="source-link">[[Source]](src/pony_check/poperator.md#L-0-12)</span>


```pony
new ref create(
  seq: Seq[T] ref)
: Poperator[T] ref^
```
#### Parameters

*   seq: [Seq](builtin-Seq.md)\[T\] ref

#### Returns

* [Poperator](pony_check-Poperator.md)\[T\] ref^

---

### empty
<span class="source-link">[[Source]](src/pony_check/poperator.md#L-0-15)</span>


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

#### Returns

* [Poperator](pony_check-Poperator.md)\[T\] ref^

---

## Public Functions

### has_next
<span class="source-link">[[Source]](src/pony_check/poperator.md#L-0-18)</span>


```pony
fun ref has_next()
: Bool val
```

#### Returns

* [Bool](builtin-Bool.md) val

---

### next
<span class="source-link">[[Source]](src/pony_check/poperator.md#L-0-21)</span>


```pony
fun ref next()
: T^ ?
```

#### Returns

* T^ ?

---

