Re: Discuss changing the behaviour of append()
- Posted by gimlet Jun 21, 2014
- 3355 views
Derek,
What I was getting at is this (and we agree this is not about a processing error).
An argument could be made that:
append(1,{}) -- {1,{}} prepend(1,{}) -- {{},1}
ought to be identical as {} is empty. (We assume the return value is a sequence).
i.e. it should not matter if you prepend or append an empty sequence you have added nothing.
Mathmatically this means: {} is the identify under append. which would mean:
{} append A == A append {} -- == equivalence
I certainly could understand people reading things this way.
I know it doesn't fit with the mechanics of Eu.
Appending an empty slice might appear as an error.