Re: Discuss changing the behaviour of append()

new topic     » goto parent     » topic index » view thread      » older message » newer message
gimlet said...

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?

jimcbrown said...

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....

gimlet said...

is what I am talking about.

Actually, you contradict yourself. You state,

gimlet said...
   a + b == b + a 
   a + 0 == 0 + a 

is what I am talking about.

as well as

gimlet said...

From the Haskell wikibook:

This property is called associativity,

but you also say

gimlet said...

Our append is strange this way. It has no identity.

These (lack of associativity and lack of identity) are two different things.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu