MathGroup Archive 1995

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

Search the Archive

Re: [Q] Thread ??

  • To: mathgroup at
  • Subject: [mg2723] Re: [Q] Thread ??
  • From: "Bart van der Zwet" <B.W.v.d.Zwet at>
  • Date: Sat, 9 Dec 1995 01:56:19 -0500

Hello mma-users,

A while ago Scott Herod posted a question on the mathgroup.
A number of people responded to this with the answer to use Unevaluated or
some trick like that.

In[1]:= blat[p_,q_]:=Module[{}, Plus @@ (Variables[p]^q)]

In[2]:= blat[{a+c,b+d},x]

Out[2]:= a^x + b^x + c^x + d^x

In[3]:= Outer[blat,{a+c,b+d},{x}] // Flatten

Out[3]:= {a^x + c^x, b^x + d^x}

If this is the output you want blat to produce then you can also do :

In[4]:= SetAttributes[blat, Listable]

In[5]:= blat[{a+c,b+d},x]

Out[5]:= {a^x + c^x, b^x + d^x}

Bart van der Zwet
Student Mathematics
Eindhoven University of Technology
The Netherlands
e-mail : B.W.v.d.Zwet at

  • Prev by Date: Re: mathematica and mac-slip
  • Next by Date: math notebook on sgi doesn't work ???
  • Previous by thread: Re: [Q] Thread ??
  • Next by thread: Re: Import/Export of data to/from Mma and Excel.