$ luarocks install tamale
Tamale adds structural pattern matching (as in Erlang, Prolog, etc.) to
Lua. Pattern matching unpacks and matches on data structures like
regular expressions do on strings.
Rather than writing a series of nested ifs to test and extract from
a structure, you can build a test function from a series of rules, and
it will generate a dispatch function (with variable captures, etc.).
Versions
Dependencies
lua >= 5.1