Previous: Boolean Tests, Up: Gathering Clauses
If expr ever evaluates to
nil
, thennil
is immediately returned; the epilogue code is not executed. If expr never evaluates tonil
, the epilogue code is executed and the last value of expr (ort
if expr was never evaluated) is returned (whereasloop
would constantly returnt
).
Like
(always (not
expr))
, except it does not influence the last value returned by a possible otheralways
clause. That is,(iter (repeat 2) (always 2) (never nil)) => 2 ; not t
If expr is ever non-
nil
, its value is immediately returned without running epilogue code. Otherwise, the epilogue code is performed andnil
is returned.This clause cannot be used together with
always
ornever
, because their defaults are opposed (similarly,(loop always 3 thereis nil)
refuses to compile in some implementations ofloop
).