Andreas Fuchs | 3 Dec 2007 16:51
Gravatar

[patch] implement multiple-value-or

Hi there,

I just stumbled over the lack of a multiple-value-or in CL, so here's  
a patch hat implement it in alexandria (with the first value  
specifying which value's non-NIL-ness to consider):
Attachment (multiple-value-or.patch): application/octet-stream, 1247 bytes

It may look horrifying, but it allows pleasant things like:

(multiple-value-or 1 (gethash key table) (gethash key alternative- 
table))

and other niceties.

Hope you like it,
--

-- 
Andreas Fuchs, (http://|im:asf <at> |mailto:asf <at> )boinkor.net, antifuchs

_______________________________________________
alexandria-devel mailing list
alexandria-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel

Gmane