MathGroup Archive 2004

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

Search the Archive

Re: Why does MatchQ[f[a][b],_f] return False?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46320] Re: [mg46285] Why does MatchQ[f[a][b],_f] return False?
  • From: Andrzej Kozlowski <andrzej at yhc.att.ne.jp>
  • Date: Sat, 14 Feb 2004 04:37:55 -0500 (EST)
  • References: <200402140256.VAA08473@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 14 Feb 2004, at 03:56, Scott Morrison wrote:

> What's going on here? How can I match for patterns like this?
>
> Thanks, Scott Morrison
> (scott at-sign math dot berkeley dot edu)
>
>
>
Because the Head of f[a][b] is f[b] not f. Thus:

MatchQ[f[a][b],Blank[f[a]]]

True


However, it does not seem to be possible to enter Blank[f[a]] using _, 
since _f[a] is Times[Blank[], f[a]].


Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: Why does MatchQ[f[a][b],_f] return False?
  • Next by Date: Re: Drawing a HEART in mathematica?
  • Previous by thread: Why does MatchQ[f[a][b],_f] return False?
  • Next by thread: Re: Why does MatchQ[f[a][b],_f] return False?