5 ms·
But nested method calls don't imply commutativity while addition does. So the code is misleading.
by erdeszt 11y ago
But nested method calls don't imply commutativity while addition does. So the code is misleading.
- DannoHung 11y agoI don't follow. How do nested method calls fail to imply commutativity? For example, using psuedo-Haskell notation: (+):: Int -> Int -> Int ; ncc short for non commutative combination ncc:: Time -> Time -> Time 1 + 2 + 3 ncc 03:00 (ncc 10:00 02:00)
- erdeszt 11y agoIt could be just me but I would expect something that looks like an addition to be commutative but not arbitrary function calls. But I see what you mean that the types are not much of a help here.