UpValues for Blank[foo]
- To: mathgroup at smc.vnet.net
- Subject: [mg54166] UpValues for Blank[foo]
- From: Josef Karthauser <joe at tao.org.uk>
- Date: Sat, 12 Feb 2005 01:57:23 -0500 (EST)
- References: <cud7du$2u7$1@smc.vnet.net> <200502110833.DAA09117@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I wonder what's I'm doing wrong. I'm trying to change the upvalues of a function with respect to Blank[] so as to have it dynamically changed into something else, e.g. := F /: Blank[F] := _?FQ where FQ[F] returns true, and false on anything else, but although installed it doesn't appear to work. To simplify the example I wondered whether I could define my own _F to behave like _Integer, i.e. := F /: Blank[F] := Blank[Integer] which appears to be in place as a rule: := ?? F Global`F _F := _Integer but doesn't work: := _F // FullForm Blank[F] I thought that maybe wrapping HoldPattern[] around the Blank[F] in the upvalue rule might have fixed it, but it doesn't. Is there some special handling for Blank[] within mathematica? Can I circumvent it somehow? Joe -- Josef Karthauser (joe at tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. =================
- References:
- Re: Mathematica to TeX
- From: Nasser Abbasi <nma@12000.org>
- Re: Mathematica to TeX