Re: Discuss changing the behaviour of append()
- Posted by gimlet Jun 12, 2014
- 4726 views
DerekParnell said...
One of the better techniques in designing applications, is to always provide validity checking on data that comes from outside the program, as opposed to data that is generated by the program.
This can (and should) be applied to functions.
A[i] can be a sequence or an atom.\\
append(A[i],x) : sequence : OK\\
atom : How do you want to see it? (atom or sequence)?
This is legitimate because A[i] is the i in A[i..i]??
A[i..i] is a sequence
A[i..i-1] ditto
A{i..i-2] is rubbish
At some point here I am losing you.

