Standardize running code in a single function, include prelude.sh.
[goals.git] / stdlib / prelude.gl
index 7e6cbd5..fdb23e9 100644 (file)
@@ -40,10 +40,7 @@ tactic *exists (filename) = {
 #----------------------------------------------------------------------
 # Text functions.
 
-# Sort + uniq a list.
-function sort (xs) = {
-    for f in %xs; do echo "$f"; done | sort -u
-}
+
 
 #----------------------------------------------------------------------
 # File functions.
@@ -54,7 +51,10 @@ function wildcard (wc) = {
     # Note that the substitution is quoted by goals, so to expand
     # it we must assign it to a variable and then use it unquoted.
     wc=%wc
+    echo '['
     for f in $wc; do
-        echo "$f"
+        quoted_string "$f"
+        echo ','
     done
+    echo ']'
 }