private int on_compare (string a, string b) {
  return a.collate (b);
}

private static int main (string[] args) {
  var l = new GLib.List<string> ();
  l.prepend ("Foo");
  l.prepend ("Bar");
  l.prepend ("Baz");

  l.sort (on_compare);

  foreach ( unowned string i in l ) {
    GLib.debug (i);
  }

  return 0;
}
