pattern example
- To: mathgroup at smc.vnet.net
- Subject: [mg119804] pattern example
- From: Francisco Gutierrez <fgutiers2002 at yahoo.com>
- Date: Thu, 23 Jun 2011 07:25:11 -0400 (EDT)
- Reply-to: Francisco Gutierrez <fgutiers2002 at yahoo.com>
I find in Leonid's (Shiffrin) excellent book the following example (p. 122):
f[3/5,4,5,2/3]/.f[x:(_Integer|_Rational)..]:>{x}
According to the book, this returns {3/5,4,5,2/3}
However, I get (Mathematica 8.0.1, Windows 7) f[3/5,4,5,2/3]
What's wrong?
Francisco
- Follow-Ups:
- Re: pattern example
- From: Arturo Amador <arturo.amador@ntnu.no>
- Re: pattern example
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: pattern example
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: pattern example
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: pattern example
- From: Tomas Garza <tgarza10@msn.com>
- Re: pattern example