Re: Simple Question -- Incrementing All Elemnts in A list by 1
- To: mathgroup at smc.vnet.net
- Subject: [mg44315] Re: Simple Question -- Incrementing All Elemnts in A list by 1
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 5 Nov 2003 10:00:39 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <bo7pfk$am8$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, # + 1 & /@ {2, 3, 4, 45, 98} Regards Jens Thiery Balser wrote: > > Hi, > > I'm sort of stuck. > > I would like to have all elements in a list incremted by a given number > without defining a supplementary function. > > What I've done so far is: > > incFunc[n_]:=n+1; > Map[incFunc,{2,3,4,45,98}] > > which is all fine. It is only that I'm looking for a solution _without_ > defining the mentioned function incFunc. > > Thanks in advance, > > Thiery