Source/NFX.Erlang/Types/ErlTupleBase.cs
/// <summary>
/// Perform pattern match on this Erlang term, storing matched variables
/// found in the pattern into the binding.
/// </summary>
Perform pattern match on this Erlang term, storing matched variables
found in the pattern into the binding.
Perform pattern match on this Erlang term storing matched variables found in the pattern into the binding .
public bool Match(IErlObject pattern, ErlVarBind binding)
    {
      if (pattern is ErlVar)
        return pattern.Match(this, binding);
      var rhs = pattern as ErlTupleBase;
      if (rhs == null || GetType() != pattern.GetType() || Count != rhs.Count)
        return false;
      return !m_Items.SkipWhile((o, i) => o.Match(rhs[i], binding)).Any();
    }
public bool Match ( IErlObject pattern , ErlVarBind binding ) { if ( pattern is ErlVar ) return pattern . Match ( this , binding ) ; var rhs = pattern as ErlTupleBase ; if ( rhs == null || GetType ( ) != pattern . GetType ( ) || Count != rhs . Count ) return false ; return ! m_Items . SkipWhile ( ( o , i ) => o . Match ( rhs [ i ] , binding ) ) . Any ( ) ; }
Perform pattern match on this Erlang term, storing matched variables
found in the pattern into the binding.
Perform pattern match on this Erlang term storing matched variables found in the pattern into the binding .
pattern
IErlObject
binding
ErlVarBind