296
Functional bros be like
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
In functional programming, everything is seen as a mathematical function, which means for a given input there is a given output and there can be no side effects. Changing a variable's value is considered a side effect and is thus not possible in pure functional programming. To work around this, you typically see a lot of recursive and higher order functions.
Declaring all values as const values is something you would do if you're a diehard functional programmer, as you won't mutate any values anyway.
thanks, kinda understand
What is the best practice then when you want to update a variable's value?
Depends on how deep down the rabbit hole you want to go :p
You just dropped a mind bomb on me. Suddenly things make sense :o
A monad is just a monoid in the category of endofunctors, what's the problem?
j = i + something