By Wolfgang Keller
Originally published 2021-04-24
Last modified 2025-09-14
In the post Brought back memories to over a decade ago with Mathematica. It's quite easy to ... | Hacker News [published 2025-08-18T08:44:33; visited 2025-09-14T15:19:45Z] of the Hacker News discussion, one can find a simple example of pattern matching in Wolfram (Mathematica):
expr = foo[bar[k], baz[V]]; expr /. foo[x_, baz[y_]] :> {x, y}
which results in
{bar[k], V}
Book linked in the article:
Franz Baader, Tobias Nipkow
Term Rewriting & All That
https://www.amazon.de/Term-Rewriting-That-Franz-Baader/dp/0521779200/
[visited 2025-09-14T01:52:35Z]