3 ms·
I don't think so. For example, sum of first 5 integers: sum i = 1 to 5 of i -> 1 + 2 + 3 + 4 + 5 = 15 Nothing mutable there. In functional programming thi
by brianberns 7y ago
I don't think so. For example, sum of first 5 integers:
sum i = 1 to 5 of i -> 1 + 2 + 3 + 4 + 5 = 15
Nothing mutable there. In functional programming this is done with a `fold`, which doesn't use mutation.
- pron 7y agoWe're talking about notation. Anything could be described in any Turing complete language. It's uncommon to have something similar to mutation in ordinary mathematical notation, but summation is one example where it's used.