Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Re: joining lists.

  • To: mathgroup at
  • Subject: [mg23838] Re: [mg23788] Re: joining lists.
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Mon, 12 Jun 2000 01:17:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

on 00.6.10 3:59 PM, Otto Linsuain at linsuain+ at wrote:

> Thanks to all that replied. Yes, I was definitely missing the obvious
> solution:
> {#1,#2} & [list1,list2] produces {list1,list2} without the unnecessary
> Join[{list1},{list2}].
> I was glad to learn that {##} & can do the same with more than two
> lists. Otto. 

Since I was responsible for that latter answer I guess I should now point
out the obvious: f[##] & is exactly the same as f, except that it will
always evaluate its arguments first. So if a function has a HoldAll,
HoldFirst or HoldRest attribute there will be a difference. Thus

Plot[Table[x^i, {i, 1, 2}], {x, -1, 1}]  will produce and error message

Plot[##] &[Table[x^i, {i, 1, 2}], {x, -1, 1}]

will work (you can of course use Evaluate inside Plot instead).

However, this has no relevance at all in the case of List.

Andrzej Kozlowski
Toyama International University

  • Prev by Date: Re: Compiled
  • Next by Date: Re: ContourPlot doesn't work properly?
  • Previous by thread: Re: joining lists.
  • Next by thread: NDSolve error message: Can't find starting value ...