On 2/10/2011, at 3:27 AM, José Romildo Malaquias wrote:
> Hello.
>
> When studing programming languages I have learned that parameter is a
> variable (name) that appears in a function definition and denotes the
> value to which the function is applied when the function is called.
Who told you t
On 10/1/11 10:27 AM, José Romildo Malaquias wrote:
But in the definition
g (_:xs) = xs
what is the parameter of the function g? Is it the pattern (_:xs)? If so
then a parameter is not necessarily a variable anymore, and that seems
very strange. And what is xs? Is it a parameter, although it
Hello,
I think you have to remember that is x in
> f x = 2 * x + 1
is just a name for the parameter and not the parameter itself.
If you look at
> g (_:xs) = xs
(_:xs) is something similar as a name. You might say '(_:xs)' stands for the
parameter (you can't say it is the name of the parameter...
I think every people will have different terms.
For instance, for my teachers, argument and parameter were synonyms, and :
in the definition :
f x = x + 3
x was a _formal_ parameter (or argument)
and in
f 32
32 was the _effective_ parameter.
So, short answer: don't bother.
Context makes things c