-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constant definition #78
Comments
Constant is also the name of a type that is a monad. I don't know if that On Tue, Jul 26, 2016, 2:06 AM Olivier Gérardin [email protected]
|
I guess the current definition is more of |
The only difference is that a variable's value can change over time. But we know that in pure functional world there is no such thing as a variable anyway :) |
In a pure functional world variables are like math variables. If you say x On Thu, Jul 28, 2016, 12:25 AM Olivier Gérardin [email protected]
|
true, but this will work if only const fact = n => n < 2 ? 1 : n * fact(n-1) |
I think it's not correct to define a constant as a variable that can only be assigned once; that's the mechanism that most programming languages use to implement constants, but it's not a definition.
I would just define it as a symbolic name for a value.
The text was updated successfully, but these errors were encountered: