I am trying to understand associative in monoid.
From the book, it says:
Associativity simply says that you can associate the arguments of your operation differently and the result will be the same.
For example:
Prelude> (1 + 9001) + 9001
18003
Prelude> 1 + (9001 + 9001)
18003
And about commutative:
This is not as strong a property as an operation that commutes or is commutative. Commutative means you can reorder the arguments and still get the same result. Addition and multiplication are commutative, but (++) for the list type is only associative.
The example above is associative and commutative but what is the difference? I can not see the difference.