cl:char   scheme


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

Implementation

;; returns a char from a string of length 1, or a list of chars from a longer string
;;; utility on top of string->list
(define cl:char 
   (lambda (string_char)
      (if (string? string_char)
          (if (> (string-length string_char) 0)
              (if (> (string-length string_char) 1)
                  (string->list string_char)
                  (car (string->list string_char))))            
          (print 'please 'enter 'a 'string))))


Back to Index

Similar Entries