stdlib: Implement filter() and filter-out() functions.
[goals.git] / docs / Goalfile.pod
index 46fbe1d..9031780 100644 (file)
@@ -30,6 +30,14 @@ For example:
 
 Returns the directory part of the path.
 
+=head3 error (msg)
+
+For example:
+
+ error ("this should not happen")
+
+This prints the error message and causes goals to exit.
+
 =head3 extension (filename)
 
 For example:
@@ -38,6 +46,24 @@ For example:
 
 Returns the filename extension.
 
+=head3 filter (pattern, list)
+
+For example:
+
+ filter ("a+", ["a", "b", "ca"]) ⇒ ["a", "ca"]
+
+Filter a list returning only the elements that match the extended
+regular expression C<pattern>.
+
+=head3 filter-out (pattern, list)
+
+For example:
+
+ filter-out ("a+", ["a", "b", "ca"]) ⇒ ["b"]
+
+Filter a list returning only the elements that I<do not> match the
+extended regular expression C<pattern>.
+
 =head3 head (list)
 
 For example: