in reply to Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
Here is the OCaml version (utilizing ExtLib):
open ExtLib;; open String;; open List;; let reverse_words s = join " " (rev (remove_all (nsplit s " ") ""));; [download]