# Confusing alternative definition of a function [duplicate]

I saw a function defined something like the following:

f[n_Integer][r, θ] = Sin[n r π/L] Cos[n r L π θ/4]


My question is, why did my professor define the function like above, instead of using f[n_Integer, r_, θ_]? What is the difference? I could not find any answers on Mathematica, or google, or here.

If this has been asked before,and I did not find it, I apologize.

## marked as duplicate by MarcoB, m_goldberg, user9660, Kuba♦, Mr.Wizard♦Jun 21 '16 at 10:41

• Related concepts: Currying, Subvalues. But just for calculation purposes, no big difference. – happy fish Jun 20 '16 at 3:00
• @Wjx, or f[1, ##] & @@@ something, if wanted. But, f[1] @@ something can be cleaner in some cases. – J. M. is away Jun 20 '16 at 3:17
• It's like $f_n(r,\theta)$ instead of $f(n,r,\theta)$ in mathematics. She or he is thinking of $n$ in a qualitatively different way (as parametrizing a sequence of functions, most likely). – Michael E2 Jun 20 '16 at 3:49