src/Lib/Arrays.php
protected static function __dropWhile(callable $predicate, array $list) : array
    {
        foreach ($list as $item) {
            if ($predicate($item)) {
                array_shift($list);
            } else {
                break;
            }
        }

        return $list;
    }
protected static function __dropWhile(callable $predicate, array $list) : array
    {
        foreach ($list as $item) {
            if ($predicate($item)) {
                array_shift($list);
            } else {
                break;
            }
        }

        return $list;
    }
protected static function __dropWhile ( callable $ predicate , array $ list ) : array { foreach ( $ list as $ item ) { if ( $ predicate ( $ item ) ) { array_shift ( $ list ) ; } else { break ; } } return $ list ; }
Drop Elements with Predicate

Given some function that returns true or false, drop elements from an array starting
at the front, testing each element along the way, until that function returns false.
Return the array without all of those elements.

@example
$greaterThanOne = function($n) { return $n > 1; };
Arrays::dropWhile($greaterThanOne, [2, 4, 6, 1, 2, 3]); // [1, 2, 3]

@type (a -> Bool) -> [a] -> [a]

@param  callable $predicate Function to use for testing
@param  array    $list      List to drop from
@return array               List with elements removed from the front
Drop Elements with Predicate