Re: Depth First Search traversal of this list

Liste des GroupesRevenir à cl lisp 
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.scheme
Date : 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

Date Sujet#  Auteur
30 Aug 24 o Re: Depth First Search traversal of this list1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal