Sujet : Re: Depth First Search traversal of this list
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp comp.lang.schemeDate : 30. Aug 2024, 19:31:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vasvme$j6b3$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6
Kenny wrote:
(defun tv (x)
(if (consp x)
(loop for y in x do (tv y))
(format t "~a " x)))
Gauche Scheme
(define (tv x)
(if (pair? x) (for-each tv x) (format #t "~a " x)))
(tv '(j k (l m (n o) p) q))
===>
j k l m n o p q