Fusonic\Linq\Linq::selectMany PHP Method

selectMany() public method

Projects each element of a sequence to a new Linq and flattens the resulting sequences into one sequence.
public selectMany ( callable $func ) : Linq
$func callable A func that returns a sequence (array, Linq, Iterator).
return Linq A new Linq object whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
    public function selectMany(callable $func)
    {
        return new Linq(new SelectManyIterator(new SelectIterator($this->iterator, $func)));
    }