[Openmcl-devel] (null #())
Stas Boukarev
stassats at gmail.com
Sun Oct 7 10:03:19 PDT 2012
Taoufik Dachraoui <dachraoui.taoufik at gmail.com> writes:
> I found (or (null x) (zerop (length x))) simple and considering, if I
> understand correctly, (alexandria:sequence-of-length-p sequence 0) is same
> as (length v) on vectors; the solution for any sequence could be
>
> (or (null x) (and (not (consp x)) (zerop (length x))))
>
> I added (not (consp x)) to avoid (length x) when x is a cons and not null
Right, that was a thinko on my part.
(if (listp x) (null x) (length x)) would be more concise.
--
With best regards, Stas.
More information about the Openmcl-devel
mailing list