src/Heterogeny/Seq.php
public function zipLeft($other)
    {
        if (count($other) !== count($this)) {
            throw new \InvalidArgumentException(
                'Both left and right must have same size.'
            );
        }

        if (is_array($other)) {
            return new Seq(
                array_map(
                    function ($a, $b) {
                        return new Tuple([$a, $b]);
                    },
                    $other,
                    $this->data
                )
            );
        }

        if ($other instanceof Seq) {
            return $other->zip($this->data);
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
public function zipLeft($other)
    {
        if (count($other) !== count($this)) {
            throw new \InvalidArgumentException(
                'Both left and right must have same size.'
            );
        }

        if (is_array($other)) {
            return new Seq(
                array_map(
                    function ($a, $b) {
                        return new Tuple([$a, $b]);
                    },
                    $other,
                    $this->data
                )
            );
        }

        if ($other instanceof Seq) {
            return $other->zip($this->data);
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
public function zipLeft ( $ other ) { if ( count ( $ other ) !== count ( $ this ) ) { throw new \ InvalidArgumentException ( 'Both left and right must have same size.' ) ; } if ( is_array ( $ other ) ) { return new Seq ( array_map ( function ( $ a , $ b ) { return new Tuple ( [ $ a , $ b ] ) ; } , $ other , $ this -> data ) ) ; } if ( $ other instanceof Seq ) { return $ other -> zip ( $ this -> data ) ; } throw new \ InvalidArgumentException ( '`$other` must be `Seq` or `array`' ) ; }
Zip with another `Seq` values on the left

@param array|Seq $other another list

@return static
Zip with another Seq values on the left