public function selectMany($select=null)
    {
        $select = LambdaUtils::toSelectCallable($select);

        $result = array();
        foreach($this as $key => $record)
        {
            $temp = call_user_func($select, $record, $key);
            if(is_array($temp) || $temp instanceof \Iterator)
            {
                foreach($temp as $tempitem)
                {
                    $result[] = $tempitem;
                }
            }
            else
            {
                $result[] = $temp;
            }
        }
        return new ArrayList($result);
    }
public function selectMany($select=null)
    {
        $select = LambdaUtils::toSelectCallable($select);

        $result = array();
        foreach($this as $key => $record)
        {
            $temp = call_user_func($select, $record, $key);
            if(is_array($temp) || $temp instanceof \Iterator)
            {
                foreach($temp as $tempitem)
                {
                    $result[] = $tempitem;
                }
            }
            else
            {
                $result[] = $temp;
            }
        }
        return new ArrayList($result);
    }
public function selectMany ( $ select = null ) { $ select = LambdaUtils :: toSelectCallable ( $ select ) ; $ result = array ( ) ; foreach ( $ this as $ key => $ record ) { $ temp = call_user_func ( $ select , $ record , $ key ) ; if ( is_array ( $ temp ) || $ temp instanceof \ Iterator ) { foreach ( $ temp as $ tempitem ) { $ result [ ] = $ tempitem ; } } else { $ result [ ] = $ temp ; } } return new ArrayList ( $ result ) ; }
Select a field and merge all arrays into one
@param callable|string|null $select
@return \PerrysLambda\ArrayList
Select a field and merge all arrays into one