21 ms·
Can you provide an example of mutability in, say, high school or undergraduate math?
by brianberns 7y ago
Can you provide an example of mutability in, say, high school or undergraduate math?
- mlevental 7y agoany sum with an index of summation requires mutability
- chobytes 7y ago"requires" is a strong word. the only explicit definition ive seen given for n-ary summations and products products was recursive.
- brianberns 7y agoI 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.