Closed pdeffebach closed 3 years ago
Well the readme says there's only implicit function calling for symbols. Here you have a whole expression which, granted, is evaluated to a function. First-argument splicing only works for function calls and macros, not for arbitrary expressions. Also, why are you doing this if _ + 1
works?
And what should work I guess is making the function call explicit: (t -> t + 1)()
That sounds good!
This is fine, i will close.
Part of this is that the weirder the expressions that I allow in the macro, the harder it becomes to read, potentially. I think a single symbol is very easy to parse as a supposed function call, but your example would already be too close optically to an expression in which an underscore could hide somewhere, making it a different thing.
Here is an edge case I think is worth looking into