> : (pre '(1 2) '(1 2 3 4))
> -> T
> : (pre '(1 2) '(1 5 2 3 4))
> -> NIL
This would make sense. That functionality is covered by 'head', though.
> 'length' returns T for circular lists currently, which is not great.
> It could return the real length too (as the number of 'car' elements),
> maybe like => (T . 5)
One reason why it returns 'T' is to make it easily checkable (with '=T').
The real length has not so much meaning for a circular list, as an
iteration would never terminate. This is also why 'T' is returned,
because 'T' has the meaning of "infinite" in comparisons.
'size' comes close to what you want:
: (size (1 2 3 .))
but it is also different
: (size (1 (2) 3.))
> What are your thoughts? Are you interested in hearing such
> suggestions or do you consider it too specific that everybody should
> implement these themselves if they need them?
I'm very glad about this kind of discussions. It is difficult to decide
for many functions what they should "mean" in general. Discussing about
them would help all of us a lot.
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]