Source/NFX.Erlang/ErlPatternMatcher.cs
/// <summary>
/// Add a matching pattern to the collection
/// </summary>
/// <param name="pattern">Erlang term to be used as a match pattern</param>
/// <param name="func">Function to invoke on successful match</param>
/// <returns>ID of the newly added pattern</returns>
Add a matching pattern to the collection
Add a matching pattern to the collection
public int Add(IErlObject pattern, PatternMatchFunc func)
    {
      int id = ++m_lastID;
      var pt = new Pattern(id, (p, t, b, args) => func(p, t, b, args), pattern);
      m_patterns.Add(pt);
      return id;
    }
public int Add ( IErlObject pattern , PatternMatchFunc func ) { int id = ++ m_lastID ; var pt = new Pattern ( id , ( p , t , b , args ) => func ( p , t , b , args ) , pattern ) ; m_patterns . Add ( pt ) ; return id ; }
Add a matching pattern to the collection
Add a matching pattern to the collection
ID of the newly added pattern
ID of the newly added pattern
pattern
IErlObject
Erlang term to be used as a match pattern
Erlang term to be used as a match pattern
func
PatternMatchFunc
Function to invoke on successful match
Function to invoke on successful match