|
[Date Index]
[Thread Index]
[Author Index]
Question on pattern matching
- To: mathgroup at smc.vnet.net
- Subject: [mg47765] Question on pattern matching
- From: "Roman Green" <rgreen at mail.ru>
- Date: Mon, 26 Apr 2004 02:40:58 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I am a very newbie in Mathematica so sorry for possibly stupid question.
In the following Mathematica's output
In[1]:= SetAttributes[k, Orderless]
In[2]:= k[a, b, b] /. k[x_, x_, y_] -> 0
Out[2]= 0
In[3]:= k[a, b, b] /. k_[x_, x_, y_] -> 0
Out[3]= k[a, b, b]
I can't understand why Mathematica can find match when applying pattern
k[x_, x_, y_], but is unable with more general pattern k_[x_, x_, y_].
Thanks in advance.
---
R. Green
Prev by Date:
Re: Modulus ? How TO
Next by Date:
Re: Modulus ? How TO
Previous by thread:
Re: Parametric Plot.
Next by thread:
Re: Question on pattern matching
|