Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

Pattern matching

Open ShalokShalom opened this issue 7 months ago • 1 comments

One very fundamental tool for functional programming I am missing.

Pattern matching is a technique that is very well known from the Erlang, OCaml, Haskell, etc communities and I love to see it in Yuescript.

Fennel has some, but I dont like to use a lisp. 🤭

There are some implementations in native Lua, but I would like to use them in Yuescript natively.

ShalokShalom avatar May 04 '25 07:05 ShalokShalom

Tried partially implemented table matching to provide some of the pattern matching functions. You may take a look and give me some ideas about what are still missing. https://yuescript.org/doc/#table-matching

pigpigyyy avatar May 08 '25 04:05 pigpigyyy