Re: Discuss changing the behaviour of append()
- Posted by jimcbrown (admin) Jun 22, 2014
- 3980 views
Jim,
So what? What are you trying to prove?
All you are doing is confirming the obvious.
a + b == b + a a + 0 == 0 + a
is what I am talking about.
Are you listening?
Are you?
append also lacks associativity. append(1, {}) and append({}, 1) return different things. Again, this is nothing to do with the proposed change - append({1}, {2}) and append({2}, {1}) also return different things. Other mathematical functions, like division or subtraction, also lack associativity.
To borrow your example,
a + b = b + a a + 0 = 0 + a
Also see that,
a / b = b / a a / 1 = 1 / a
Oh, wait a minute....
is what I am talking about.
Actually, you contradict yourself. You state,
a + b == b + a a + 0 == 0 + a
is what I am talking about.
as well as
From the Haskell wikibook:
This property is called associativity,
but you also say
Our append is strange this way. It has no identity.
These (lack of associativity and lack of identity) are two different things.

