Re: joining lists.
- To: mathgroup at smc.vnet.net
- Subject: [mg23764] Re: [mg23739] joining lists.
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Sat, 10 Jun 2000 02:59:11 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I don't think there is a named function that will do just what you want, but
you can always use {##} &, e.g.
In[20]:=
{##} &[{1, 2, 3}, {4, 5, 6}, {a, b, c, d}]
Out[20]=
{{1, 2, 3}, {4, 5, 6}, {a, b, c, d}}
on 6/5/00 2:09 PM, Otto Linsuain at linsuain+ at andrew.cmu.edu wrote:
>
> hi all, this should be simple.
>
> I got:
>
> list1={ some numbers }
>
> list2={ some other numbers }
>
> Append[list1,list2] gives me { some numbers, { some other numbers } }
>
> Join[list1,list2] gives me { some numbers, some other numbers }
>
> I want { { some numbers }, { some other numbers } }
>
>
> Actually I have found that:
>
> Join[{list1},{list2}] does what I want but I don't find it very elegant.
>
> I can live with the lack of elegance, but I wonder if there is some
> other function or construction (for joining lists) that I am not aware
> of.
>
> Thanks in advance. Otto Linsuain.
>