SML code to generate the chorus of Pharrel's "Happy" using a recursive function.
Experimental hack mostly written on a train when out of practice, so not very elegant.
Developed using polyML http://sourceforge.net/projects/polyml/
Install instructions http://www.polyml.org/download.html