cl:list-to-string   scheme


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm

Implementation

;
;; (list-to-string '(5 6 7))
;; from a list returns a string equivalent  - similar to atom->string..
;; there is list->string too, but I don't know how to use it!
(define cl:list-to-string 
   (lambda (lst)
      (let* ((out "(")
             (nlst (map (lambda (x)
                           (atom->string x))
                        lst)))
         (map (lambda (x)
                 (set! out (string-append out " " x)))
              nlst)
         (set! out (string-append out " )"))
         out)))


Back to Index