Closed Roger-luo closed 5 years ago
should be &2π
, this part is a bit intuitive to me. I'm wondering if it is possible to just write 2π
without making ambiguity?
It's &(2π)
.
I'm wondering if it is possible to just write 2π without making ambiguity?
It's impossible, I remember we used to discuss about this.
Expr(:call, 2, :π)
shouldn't match Expr(:call, 2, π)
, does it make sense?
:π
is a pattern to match a symbol :π
,π
is a pattern to capture the positional value as variable π
, &π
is a pattern to match the positional value with the variable π
in current scope.yeah, closed.
MWE:
it seems there is no way to eval numerics in the pattern?