News for hackers. Stuff that matters.
Re:Exotic Programming Ideas, Part 2: Term Rewriting by kmill on Monday November 16, 2020 @01:42PM (#25115353)
The left-hand side of the arrow is a pattern expression [1] (though usually you'd use the :> arrow to delay evaluation of the right-hand side). The "full" notation is x_H for a pattern variable x that needs to have head H. Dropping the H, it matches anything. Dropping the x, it just doesn't set a variable when matching. Dropping both, it matches anything and doesn't set a variable.

[1] https://reference.wolfram.com/language/guide/Patterns.html

Re:Exotic Programming Ideas, Part 2: Term Rewriting by tgb on Monday November 16, 2020 @01:56PM (#25115518)
Okay thanks, that all makes more sense now.