Re: Discuss changing the behaviour of append()
- Posted by gimlet Jun 12, 2014
- 3811 views
Derek,
We agree that a function's parameters should be validated before entering the function. This is why I have said:
The real problem is not append but A[i] being an atom.
My point with the various slices is that every slice is a sequence but A[i] is possibly not.
It would seem reasonable (to me at least) that A[i] and A[i..i] ought be interchangeable. Therefore I am inclined to say the difficulty with append is with the (ambiguous) nature of A[i].
I don't think that append shoud be changed as restricting the target type to sequence is a good restriction.