                 (Result name)
             (List _ range)
                 (Error  (MalformedSymbolError range))))
+
+(def char-is-upper-case? (char)
+     (and (>= char 65) (<= char 90)))
+
+(def name-of-constructor? (name)
+     (match name
+            (Cons first-letter _)
+                (char-is-upper-case? first-letter)
+            Empty
+                False))
 
 (typ type          (SimpleType           (list int32) range)
                    (ComplexType          (list int32) (list type) range)

                              (FunctionApplication expressions range))))
         expressions))

(def sexp-to-pattern (sexp)
     (match sexp
            (List (Cons name rest) range)

                  ((pipe
                      (maybe-map  (fn (integer)
                                      (Result (IntegerPattern integer range))))
                      (maybe-else (fn () (to-constructor-or-capture range name)))
                  ) (string-to-int32 name))))

(def sexp-to-match-pair (pair)
