[erlang-questions] Pattern-matching function?

Richard Carlsson richardc@REDACTED
Wed Oct 29 15:24:56 CET 2008


Francois De Serres wrote:
> Hi there.
> 
> I need a function that actually does pattern matching: pm(Tuple, Pattern)->MatchedPattern|error

You cannot pass a pattern with uninstantiated variables to a function.
Erlang is a strict functional language, it is not Prolog. Patterns are
not run-time values.

    /Richard



More information about the erlang-questions mailing list