MathGroup Archive 2007

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

Search the Archive

Re: List manipulation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73280] Re: List manipulation
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Fri, 9 Feb 2007 02:27:48 -0500 (EST)

On 2/8/07 at 3:48 AM, gary.larson at gmx.at (sepp) wrote:

>I have a list with liste={{a1,a2,a3},{b1,b2,b3},{c1,c2,c3},.....}
>and a single element {e}

>I would to add the element {e} to each sublist to get something like
>liste_new={ {a1,a2,a3,e},{b1,b2,b3,e},{c1,c2,c3,e},.....} so that
>finally I can apply a function f on the list liste_manipulated={f[
>{a1,a2,a3,e}],f[{b1,b2,b3,e}],f[{c1,c2,c3,e}],.....}

This is easily done with a pure function and Map. For example
either of the following will do

Join[#,{e}]&/@liste

Append[#,e]&/@liste
--
To reply via email subtract one hundred and four


  • Prev by Date: Showing that a hypergeometric expression is 0?
  • Next by Date: Re: How to parse result from Reduce[ ] function
  • Previous by thread: Re: List manipulation
  • Next by thread: Re: List manipulation