src/Heterogeny/Seq.php
public function equals($other): bool
    {
        if (is_array($other) || $other instanceof self) {
            return count($other) === count($this) &&
                $this->zip($other)->every(
                    function ($tuple) {
                        list($a, $b) = $tuple;

                        if ($a instanceof Equalable) {
                            return $a->equals($b);
                        }

                        return $a === $b;
                    }
                );
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
public function equals($other): bool
    {
        if (is_array($other) || $other instanceof self) {
            return count($other) === count($this) &&
                $this->zip($other)->every(
                    function ($tuple) {
                        list($a, $b) = $tuple;

                        if ($a instanceof Equalable) {
                            return $a->equals($b);
                        }

                        return $a === $b;
                    }
                );
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
public function equals ( $ other ) : bool { if ( is_array ( $ other ) || $ other instanceof self ) { return count ( $ other ) === count ( $ this ) && $ this -> zip ( $ other ) -> every ( function ( $ tuple ) { list ( $ a , $ b ) = $ tuple ; if ( $ a instanceof Equalable ) { return $ a -> equals ( $ b ) ; } return $ a === $ b ; } ) ; } throw new \ InvalidArgumentException ( '`$other` must be `Seq` or `array`' ) ; }
Deep strict comparison, preferable over `==`

@param array|Seq $other other `Seq` to compare

@return bool
Deep strict comparison preferable over ==