MathGroup Archive 2010

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

Search the Archive

sq[x_]:=x*x vs sq=Function[x, x*x]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113847] sq[x_]:=x*x vs sq=Function[x, x*x]
  • From: kj <no.email at please.post>
  • Date: Mon, 15 Nov 2010 05:52:00 -0500 (EST)


One could define a squaring function as either

sq[x_] := x*x

or

sq = Function[x, x*x];

Why/when would one want to choose one form over the other?

TIA!

kj


  • Prev by Date: Re: Plotting functions and lines on the same figure?
  • Next by Date: Re: speech processing?
  • Previous by thread: Re: Mathematica 8 docs online now!
  • Next by thread: Re: sq[x_]:=x*x vs sq=Function[x, x*x]