literal-match?   scheme


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

Implementation

(define literal-match?
  (lambda (expr em)
    (let* ((a (string=? (cadddr em) "literal"))
           (b (match-expr expr (car em)))
           (b2 (if (or (eqv? b #f) 
                       (equal? b (list MATCH-FAILED))
                       (equal? b MATCH-FAILED))
                   #f 
                   #t)))
      ;; (println 'expr expr 'em em 'a a 'b b 'b2 b2 '-- (if (and a b2) #t #f))
      (if (and a b2) #t #f))))


Back to Index

Similar Entries

  • literal-match?    scheme