MathGroup Archive 1998

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

Search the Archive

RE: Questions about functions.



Try:
f[x___]:={x}

f[a,b] gives {a,b}


----------------------------------------------- Jean-Marie THOMAS
Conseil et Audit en Ingenierie de Calcul www.cybercable.tm.fr/~jmthomas
------------------------------------------------


-----Message d'origine-----
De:	El alchemista [SMTP:jaimeco@pecos.rc.arizona.edu] Date:	samedi 28
mars 1998 06:26
A:	mathgroup@smc.vnet.net
Objet:	[mg11801] Questions about functions.

I will appreciate your input to these two questions.

1 - How can I convert the sequence of all arguments of a function  into
a list ?              In vain I tried      f[x__] := List @@ x 


2 - How can I make functions which use their own names , for instance so
that   s[e,f]   for some symbol   s   and all expressions    e , f   
becomes    (s+e)(s+f)  ?


Many thanks

jaime Combariza
jaimeco@arizona.edu




  • Prev by Date: Re: Questions about functions.
  • Next by Date: Re: commutativity
  • Prev by thread: Re: Questions about functions.
  • Next by thread: Re: Questions about functions.