match   scheme


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

Implementation

;; returns #f if failed match
;; returns a list of matched variables (or null if no variable names specified.)
(define match
  (lambda (em)
    (lambda (e)
      (let* ((res (match-expr e em))
            (pairs (if (null? res) '()
                      (map (lambda (x) 
                              (if (vector? x)
                                  (vector->list x)
                                  x))
                            res))))
        (if (tree-member MATCH-FAILED res) 
            #f 
            pairs)))))


Back to Index

Similar Entries

  • MATCH-FAILED    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • MATCH-TRUE    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • ai_find_matching_node    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • check-for-literal-match    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • custom-match    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • get-matching-length    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • get-true-matches    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • impc:compiler:print-type-mismatch-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ir:genericfunc-match-closure-types    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ir:genericfunc-match-tuple-types    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:descending-generic-type-match    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:generic-types-matchup?    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:nativef-poly-check-match-ftypes    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:polytype-match?    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • is-match-multi?    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • literal-match?    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • literal-match?    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-check-variable    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-check-variable-predicates    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-expr    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-list    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-number    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-pair    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-result:bind    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • match-result:get    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • match-result:make    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • match-result:variables    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • match-string    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-symbol    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match-vector    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern.xtm
  • match_aiString    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • matcher:make    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • matcher:proc    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • matcher:type    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • matcher:variables    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • p:assert-match    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • p:if-matches    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • p:match    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • p:matcher    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • p:matches?    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • regex_match    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_match    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_match    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_match    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • regex_matches    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm