Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

UpValues for Blank[foo]

  • To: mathgroup at
  • Subject: [mg54166] UpValues for Blank[foo]
  • From: Josef Karthauser <joe at>
  • Date: Sat, 12 Feb 2005 01:57:23 -0500 (EST)
  • References: <cud7du$2u7$> <>
  • Sender: owner-wri-mathgroup at

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
    _F := _Integer

but doesn't work:

    := _F // FullForm

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?

Josef Karthauser (joe at
FreeBSD (cvs meister, admin and hacker)
Physics Particle Theory (student)
================ An eclectic mix of fact and theory. =================

  • Prev by Date: Re: Create Permanent Self Defined Function?
  • Next by Date: Re: [Mathematica 5.1] Bug Report - Two numerical values for a same variable
  • Previous by thread: Re: Mathematica to TeX
  • Next by thread: Re: UpValues for Blank[foo]