Source/NFX.Erlang/Types/ErlVar.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 (binding == null)
        return false;
      IErlObject value = binding[Name];
      if (value != null)
        return checkType(value) ? value.Match(pattern, binding) : false;
      if (!checkType(pattern))
        return false;
      IErlObject term = null;
      binding[Name] = pattern.Subst(ref term, binding) ? term : pattern;
      return true;
    }
public bool Match ( IErlObject pattern , ErlVarBind binding ) { if ( binding == null ) return false ; IErlObject value = binding [ Name ] ; if ( value != null ) return checkType ( value ) ? value . Match ( pattern , binding ) : false ; if ( ! checkType ( pattern ) ) return false ; IErlObject term = null ; binding [ Name ] = pattern . Subst ( ref term , binding ) ? term : pattern ; return true ; }
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