HH\Pair::items

Returns an Iterable view of the current Pair

public function items(): HH\Rx\Iterable<mixed>;

The Iterable returned is one that produces the values from the current Pair.

Returns

  • HH\Rx\Iterable<mixed> - The Iterable view of the current Pair.

Examples

$p = Pair {'foo', -1.5};

// Get an Iterable view of the Pair
$iterable = $p->items();

// Print both values in the Iterable
foreach ($iterable as $value) {
  echo $value."\n";
}
Output
foo
-1.5