simple-var?   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/base/pattern.xtm

Implementation

;;@ignore
;; ?<name>
(define (simple-var? datum)
  (and (symbol? datum)
       (let ((as-list (string->list (symbol->string datum))))
         (and (>= (length as-list) 1)
              (eqv? #\? (first as-list))
              (or (null? (cdr as-list))
                  (not (eqv? (second as-list) #\?)))))))
;;@ignore
;; ?<name> -> <name>


Back to Index