+# Substitute.
+pure function subst (from, to, text) returning string = @{
+ # We need to replace any / characters in ‘to’ with escaped ones.
+ to="$( echo -n %to | sed 's,/,\\/,g' )"
+ echo %text | sed -E s/%from/$to/g
+}
+
+# Tail of a list.
+pure function tail (xs) returning strings = @{
+ drop=1
+ for f in %xs; do
+ if [ -z "$drop" ]; then echo "$f"; fi
+ drop=
+ done
+}
+