[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Re: Need help with use of inner-lambda lists in defmacro

William James

10/15/2015 2:17:00 AM

Kenny Tilton wrote:

> (let ((x '((a b :k1 c)(d e :k1 f))))
> (dolist (y x)
> (destructuring-bind (p1 p2 &key k1) y
> (print (list p1 p2 k1)))))

Gauche Scheme:

(use util.match)

(let ((x '((a b :k1 c)(d e :k1 f))))
(dolist (y x)
(match y
((p1 p2 :k1 k) (print p1 p2 k)))))

abc
def

--
Let us be brought to believe it is ... favorable to ... our interest to
transfer the African to his native clime, and we shall find a way to do it,
however great the task may be. --- A. Lincoln, Sept. 22, 1856