+ }
+ return str;
+}
+exports.tkTreeToSExp = tkTreeToSExp;
+/**inspect the inner of the representation. */
+let repr = (x) => { return util.inspect(x, { depth: null }); };
+/**
+ *
+ * # PARSER UNITS
+ */
+function toSome(x) {
+ return { _tag: "Some", value: x };
+}
+/**
+ * like `m ==> f` in ocaml
+ * @param m matchee wrapped
+ * @param f matching function
+ * @returns wrapped result
+ */
+function thenDo(m, f) {
+ if (m._tag == "None") {
+ return m;
+ }
+ else {
+ var a = f(m.value);
+ if (a._tag == "Some") {
+ a.value.ast = m.value.ast.concat(a.value.ast);
+ }
+ return a;
+ }