Table of Contents
Take ( int $amount )
Returs the first amount input values, discarding the remaining values.
Basic usage example.
<?php use Webbhuset\Pipeline\Constructor as F; $take = F::Take(2); $input = [1, 3, 5, 7, 9]; echo json_encode(iterator_to_array($take($input))); // Output: [1,3]