+
+
+SCM
+ly_string_array_to_scm (vector<string> a)
+{
+ SCM s = SCM_EOL;
+ for (vsize i = a.size (); i ; i--)
+ s = scm_cons (ly_symbol2scm (a[i - 1].c_str ()), s);
+ return s;
+}
+
+/* SYMBOLS is a whitespace separated list. */
+SCM
+parse_symbol_list (char const *symbols)
+{
+ while (isspace (*symbols))
+ *symbols++;
+ string s = symbols;
+ replace_all (&s, '\n', ' ');
+ replace_all (&s, '\t', ' ');
+ replace_all (&s, " ", " ");
+ return ly_string_array_to_scm (string_split (s, ' '));
+}
+
+/* GDB debugging. */
+struct ly_t_double_cell
+{
+ SCM a;
+ SCM b;
+ SCM c;
+ SCM d;
+};
+
+/* inserts at front, removing duplicates */
+SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val)
+{
+ return scm_acons (key, val, scm_assoc_remove_x (alist, key));
+}
+