src/QCheck/FP.php
public static function iterator($xs)
    {
        if (is_array($xs)) {
            return new \ArrayIterator($xs);
        }
        if (!$xs instanceof \Iterator) {
            throw new \InvalidArgumentException();
        }
        return $xs;
    }
public static function iterator($xs)
    {
        if (is_array($xs)) {
            return new \ArrayIterator($xs);
        }
        if (!$xs instanceof \Iterator) {
            throw new \InvalidArgumentException();
        }
        return $xs;
    }
public static function iterator ( $ xs ) { if ( is_array ( $ xs ) ) { return new \ ArrayIterator ( $ xs ) ; } if ( ! $ xs instanceof \ Iterator ) { throw new \ InvalidArgumentException ( ) ; } return $ xs ; }
Return an iterator for the given collection if
possible.

@param $xs
@return \ArrayIterator
@throws \InvalidArgumentException
Return an iterator for the given collection if possible .