MathGroup Archive 2009

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

Search the Archive

OneIdentity

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103478] OneIdentity
  • From: Chris Osborn <chrisosb at gmail.com>
  • Date: Wed, 23 Sep 2009 23:52:05 -0400 (EDT)

I do not understand why I get "False" instead of "True" here:


In[773]:= ClearAll[key];
SetAttributes[key, OneIdentity];

MatchQ[13, key[_]]

Out[775]= False


According to the docs:

OneIdentity
is an attribute that can be assigned to a symbol f to indicate that f
[x], f[f[x]], etc. are all equivalent to x for the purpose of pattern
matching.


Thanks in advance,
Chris


  • Prev by Date: ListAnimate exported
  • Next by Date: SumOfSquaresRepresentations
  • Previous by thread: ListAnimate exported
  • Next by thread: Re: OneIdentity