You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow numeric (not symbolic) arithmetic expressions in patterns.
allow unpacking of numerator and denominator variables in patterns.
special case: a / b because there is a canonical form (via gcd).
match would fail if the actual argument is not integer or rational.
b would be bound to 1 if the argument was an integer.
can't allow arbitrary ops and combinations because i.e. (a + 2) * b
can't uniquely determine a and b, and a ** 2 would require a
to be bound to the square root of the actual argument.
allow unpacking of the real and imaginary parts of a complex number in patterns.
another special case: a + b, b would be bound to 0i if the actual
argument is not complex.
a / bbecause there is a canonical form (via gcd).bwould be bound to1if the argument was an integer.(a + 2) * bcan't uniquely determine
aandb, anda ** 2would requireato be bound to the square root of the actual argument.
a + b,bwould be bound to0iif the actualargument is not complex.