MathGroup Archive 2006

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

Search the Archive

Re: How to extract functions from a list and call them with any argument?


Dom,

What you're asking for seems really strange to me, but this is one way
to do it... (cut 'n paste for clarity)

TagSetDelayed[funclist,
  funclist[blah_][[i__]],{Sin[x],x^3,Cos[x]^2}[[i]]/.x\[Rule]blah]
funclist[\[Pi]/2][[1]]
funclist[\[Pi]][[{1,2}]]

http://chris.chiasson.name/


  • Prev by Date: Integrate is not additive?
  • Next by Date: Re: matrix operations -- shared data vs copied
  • Previous by thread: Re: How to extract functions from a list and call them with any argument?
  • Next by thread: Re: How to extract functions from a list and call them with any argument?