Foo + = 1 is considered functional?

I thought about creating a CONS function to create a list, but then I realized that im does not mutate any state with foo + = 1, since its == foo = foo + 1, which is a new object

+3
source share
1 answer

Status changed: the value associated with the variable changes foo.

It is "not functional" in the pure sense. I may be tempted to call it "confusing"; -)

Happy coding.

+15
source

All Articles