4 ms·
> f is associative: for all a, b and c, we have f(f(a, b), c) == f(a, f(b, c)) > Relative paths in a file system form a Monoid under appending How can appendi
by ksenzee 9y ago
> f is associative: for all a, b and c, we have f(f(a, b), c) == f(a, f(b, c))
> Relative paths in a file system form a Monoid under appending
How can appending be associative?
- jpfed 9y agoBecause ABC could be built by appending C to AB, or appending BC to A.
- Koshkin 9y agoWell, I guess, it's useful to remember that String type is a monoid after all! :)
- deleted 9y ago[deleted]
- jhomedall 9y agoYou might be confusing the associative property with the commutative property (I do this all the time): associative: (a + b) + c = a + (b + c) commutative: a + b = b + a For example, appending strings is associative, but not commutative. Appending items to an unordered set is both associative and commutative.
- ksenzee 9y agoI was! Thank you.