Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

working with lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113194] working with lists
  • From: Sam Takoy <sam.takoy at yahoo.com>
  • Date: Mon, 18 Oct 2010 05:47:02 -0400 (EDT)

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


  • Prev by Date: A integral
  • Next by Date: ListAnimate
  • Previous by thread: Re: A integral
  • Next by thread: Re: working with lists