Re: pattern example
- To: mathgroup at smc.vnet.net
- Subject: [mg119839] Re: pattern example
- From: "E. Martin-Serrano" <eMartinSerrano at telefonica.net>
- Date: Sat, 25 Jun 2011 05:27:16 -0400 (EDT)
- References: <201106231125.HAA25887@smc.vnet.net> <201106241147.HAA09802@smc.vnet.net>
Hi
It works in 8.0.1 Windows7 too
In[1]:= f[3/5,4,5,2/3]/.f[x:(_Integer|_Rational)..]:>{x}
Out[1]= {3/5,4,5,2/3}
-----Mensaje original-----
De: Leonid Shifrin [mailto:lshifr at gmail.com]
Enviado el: viernes, 24 de junio de 2011 13:48
Para: mathgroup at smc.vnet.net
Asunto: Re: pattern example
Hi Francisco,
I can't check on 8.0.1 right now, but both v8.0 and v7.0 give the result as
in the book.
I hope someone else will comment on 8.0.1.
Cheers,
Leonid
On Thu, Jun 23, 2011 at 3:25 PM, Francisco Gutierrez <fgutiers2002 at yahoo.com
> wrote:
> 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
>
>
- References:
- pattern example
- From: Francisco Gutierrez <fgutiers2002@yahoo.com>
- Re: pattern example
- From: Leonid Shifrin <lshifr@gmail.com>
- pattern example