Split off application of result from main body of matcher to
authorChris Hanson <org/chris-hanson/cph>
Thu, 7 May 1987 00:09:08 +0000 (00:09 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 7 May 1987 00:09:08 +0000 (00:09 +0000)
facilitate timing measurements.

v7/src/compiler/base/pmlook.scm

index 0b2c2a92ffe19801e7c10cbabe18b60d5dfd2c24..73381e9c79b1484d29328e8d2587150ec7798a41 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/pmlook.scm,v 1.3 1987/04/21 23:52:08 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/pmlook.scm,v 1.4 1987/05/07 00:09:08 cph Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -63,10 +63,13 @@ MIT in each case. |#
            (eqv? pattern instance)))
       (and (not (null? entries))
           (or (and (match (caar entries) instance)
-                   (apply (cdar entries) values))
+                   (pattern-lookup/bind (cdar entries) values))
               (lookup-loop (cdr entries) '()))))
     (lookup-loop entries '())))
 
+(define (pattern-lookup/bind binder values)
+  (apply binder values))
+
 (set! pattern-variables
   (named-lambda (pattern-variables pattern)
     (let ((variables '()))