Source/NFX.Erlang/Types/ErlList.cs
/// <summary>
/// Determine if two Erlang objects are equal
/// </summary>
Determine if two Erlang objects are equal
Determine if two Erlang objects are equal
public override bool Equals(IErlObject o)
      {
        if (o is ErlList) return Equals((ErlList)o);
        if (o is ErlString)
        {
          var rhs = ((ErlString)o).Value;
          if (rhs.Length != m_Items.Count) return false;
          return !rhs.Where((t, i) => !m_Items[i].IsInt() || (int)t != m_Items[i].ValueAsInt).Any();
        }
        return false;
      }
public override bool Equals ( IErlObject o ) { if ( o is ErlList ) return Equals ( ( ErlList ) o ) ; if ( o is ErlString ) { var rhs = ( ( ErlString ) o ) . Value ; if ( rhs . Length != m_Items . Count ) return false ; return ! rhs . Where ( ( t , i ) => ! m_Items [ i ] . IsInt ( ) || ( int ) t != m_Items [ i ] . ValueAsInt ) . Any ( ) ; } return false ; }
Determine if two Erlang objects are equal
Determine if two Erlang objects are equal
o
IErlObject