Factor out param_decl and improvements to AST printing.
[goals.git] / src / utils.mli
index 423847a..2d7d01b 100644 (file)
@@ -19,3 +19,8 @@
 
 val failwithf : ('a, unit, string, 'b) format4 -> 'a
 (** Like [failwith] but supports printf-like arguments. *)
+
+val filter_map : ('a -> 'b option) -> 'a list -> 'b list
+(** [filter_map f l] applies [f] to every element of [l], filters
+    out the [None] elements and returns the list of the arguments of
+    the [Some] elements. *)