+
+ (define (get-bindings product-types pattern)
+ (define (go product-type product)
+ (case (ast-type x)
+ ['var (list (cons product product-type))]
+ ; an inner pattern match
+ ['app (get-bindings product-type product)]))
+ (flat-map go product-types (cdr pattern)))
+
+