Re: working with lists

*To*: mathgroup at smc.vnet.net*Subject*: [mg113228] Re: working with lists*From*: Tomas Garza <tgarza10 at msn.com>*Date*: Tue, 19 Oct 2010 05:57:27 -0400 (EDT)*References*: <201010180947.FAA00936@smc.vnet.net>

I may have missed something, but shouldn't f[{ 1 2 3 5 7}] be { 1 2 6 4 6}? AFAIK 7 is not divisible by 3. > Date: Mon, 18 Oct 2010 05:47:02 -0400 > From: sam.takoy at yahoo.com > Subject: [mg113194] working with lists > To: mathgroup at smc.vnet.net > > Hi, > > I'm not very good at working with lists. May I ask for someone to work > out an example which has several elements of what I need to do. > > What's the best way to write a function f[list] that goes through each > element of the lest, doubles each element divisible by three and reduces > each of the following elements by 1. That is > > > f[{ 1 2 3 5 7}] is { 1 2 6 4 12 } > > Many thanks in advance, > > Sam >

**References**:**working with lists***From:*Sam Takoy <sam.takoy@yahoo.com>