Pattern matching trivia
- To: mathgroup at smc.vnet.net
- Subject: [mg13628] Pattern matching trivia
- From: Ersek_Ted%PAX1A at mr.nawcad.navy.mil
- Date: Fri, 7 Aug 1998 03:08:29 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I just discovered something interesting about pattern matching. The
definitions for (goo) are no applied in the lines below. I understand
because an expression with the head Complex or Rational is an atom, and
considered a sum or product of smaller expressions.
Now the function (foo) below has the attribute HoldAllComplete. The
peculiar thing is that the definitions are now used. It seems that
when the arguments of (foo) are Complex or Rational, the pattern
matcher now treats these arguments as the sum or product of smaller
It turns out Version 3.0 has exactly five built in functions with the
HoldAllComplete attribute. They are: HoldComplete
Note: Parenthesize is only documented via the usage message below. I
think that means it's an experimental feature.
"Parenthesize[ expr, fmt, prec, group] will represent expr in format fmt
parenthesize it if necessary."
Starting 10 Aug 1998 my email address will be: ErsekTR at navair.navy.mil
Prev by Date:
A couple of curious outputs from Integrate
Next by Date:
Re: What is the fastest machine for Mathematica?
Previous by thread:
Re: A couple of curious outputs from Integrate
Next by thread:
Re: Pattern matching trivia