I have have list of lists and I would like to be able to append an element to the start of each list. I am sure there must be an elegant solution.
EG: a and {{b,c},{d,e,f}} -> {{a,b,c},{a,d,e,f}}
If I want to apply a function to a list of lists I normally use @@@ however I don't know how to modify this so that it gets feed into the second argument or AppendTo.
Can someone please explain how I could achieve this?
Prepend[#, a] & /@ {{b, c}, {d, e, f}}? I feel there is a thread on this around already, probably with a thousand nice solutions... – Yves Klett Sep 11 '14 at 09:45Prepend[#, 0]& /@ listsand{0, ##} & @@@ lists– Mr.Wizard Sep 11 '14 at 10:14