in reply to Implementing named infix operators with parser hook?
Just out of curiosity, did you consider something like: is 2 => between(1,3)? There's still the need for a comma* (or arrow) between the left operand and "infix" operator, but it's a little less scary looking than 2->$BETWEEN(1, 3). Also it's quite easy to implement, &is would just call the closure returned by &between. And closures are good.
*Unless you want to write that as is { 2 } between 1, 3;, personally I don't like that version.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Implementing named infix operators with parser hook?
by LanX (Saint) on Aug 17, 2018 at 10:52 UTC | |
by anonymized user 468275 (Curate) on Aug 17, 2018 at 11:28 UTC | |
by LanX (Saint) on Aug 17, 2018 at 11:36 UTC |