Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Matching with a "Flat" function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70857] Matching with a "Flat" function
  • From: "Szabolcs" <szhorvat at gmail.com>
  • Date: Mon, 30 Oct 2006 05:32:16 -0500 (EST)

Could someone explain this behaviour to me? I'd expect f[_Integer] to
match f[2] even after I set attribute Flat on f.

Szabolcs

In[1]:= MatchQ[f[2],f[_]]

Out[1]= True

In[2]:= MatchQ[f[2],f[_Integer]]

Out[2]= True

In[3]:= SetAttributes[f,Flat]

In[4]:= MatchQ[f[2],f[_]]

Out[4]= True

In[5]:= MatchQ[f[2],f[_Integer]]

Out[5]= False


  • Prev by Date: Re: Singularity handling in NIntegrate
  • Next by Date: Publicon
  • Previous by thread: Why all the if's the answer (revised!!!)
  • Next by thread: Publicon