MathGroup Archive 2010

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

Search the Archive

Re: From list to list of arguments


On Oct 22, 7:38 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
> Hi,
>
> Suppose I have a list of arrays, say g = {a, b, c} where a, b, and c are
> arrays, and I would like to calculate
>
> Outer[Times, a, b, c]
>
> how do I do it?
>
> I tried
>
> Apply[Outer[Times,#]&, g], as in Apply[Outer[Times, #] &, {{1}, {1}}],
> but that does not yield the right answer. So the question is: how does
> one convert a list {a, b, c} into arguments to a function of variable
> number of arguments? Thanks!
>
> An auxiliary question: within the function f[x__] := ... what kind of
> object is x? It's not a list, but what is it?
>
> Many thanks in advance,
>
> Sam

Hello

Did you try
        Outer[Times, Sequence @@ g]

Also: you can see that
        FullForm[f[x__]]
gives
       f[Pattern[x,BlankSequence[]]]

Best Regards
Norbert Marxer




  • Prev by Date: Re: From list to list of arguments
  • Next by Date: Re: Two questions related to Arrays
  • Previous by thread: Re: From list to list of arguments
  • Next by thread: Re: From list to list of arguments