4 ms·
Yes, that's true. But Lisp is untyped. The notation [a] could just as easily have meant a non-empty list
by sriram_malhar 2y ago
Yes, that's true. But Lisp is untyped.
The notation [a] could just as easily have meant a non-empty list
- HelloNurse 2y agoIt is necessary to represent the empty list whose elements (if it had any) are type A, and its type must be the same as a nonempty list of A, because concatenating the two must be a well-defined and representable operation while concatenating empty lists of different types must be as wrong as concatenating nonempty ones. Moreover, in practice most variables, function parameters and the like should be declared as a possibly empty list of A, without special cases.