                 (result-first   (fn (expression)
                                     (Pair pattern expression))
                                 (sexp-to-expression expression)))
-                                (sexp-to-expression pattern))))
+                                (sexp-to-pattern pattern))))
 
 (def collect-pairs (list)
      (match list

                              (FunctionApplication expressions range))))
         expressions))

(def sexp-to-match-pair (pair)
     (match pair
            (Pair pattern expression)

                   (FunctionType         (list type) type range))
(typ constructor   (SimpleConstructor    (list int32) range)
                   (ComplexConstructor   (list int32) (list type) range))
(typ pattern       (Capture              (list int32) range)
                   (ConstructorPattern   (list int32) (list pattern) range))
(typ expression    (IntegerConstant      int32 range)
                   (Identifier           (list int32) range)
                   (Lambda               (list (list int32))
