Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I define 2 functions:

g[s_][x_,y_] := the gaussian  (1)

g1[s_,x_,y_] := the gaussian  (2)

I get the same answer using g[s][ x, y] and g1[ s, x, y].
So, what is the difference?
Is there some advantage to be gained in definition 1 over 2?

share|improve this question

marked as duplicate by rcollyer, Oleksandr R., Michael E2, Kuba, Sjoerd C. de Vries Jul 17 '13 at 5:33

This question was marked as an exact duplicate of an existing question.

1  
Possible duplicate: mathematica.stackexchange.com/q/7999/121 – Mr.Wizard Jul 17 '13 at 1:32
2  
On the surface, not much. But, they are treated differently by the evaluator, the second (a downvalue) being evaluated before the first (a subvalue). Also, you can add an attribute to a downvalue, but not to a subvalue, without some contortions. – rcollyer Jul 17 '13 at 4:07

Browse other questions tagged or ask your own question.