Otp.Erlang.List.Equals C# (CSharp) Method

Equals() public method

public Equals ( System o ) : bool
o System
return bool
        public override bool Equals(System.Object o)
        {
            if (!(o is List))
                return false;

            List l = (List) o;
            int a = this.arity();

            if (a != l.arity())
                return false;

             for (int i = 0; i < a; i++)
            {
                if (!this.elems[i].Equals(l.elems[i]))
                    return false;
                // early exit
            }

            return true;
        }