SML/NJ is not the only functional language I could have chosen to demonstrate real-world programming.
The OCaml system[OCaml] is an implementation of a language in the ML family. The language is different from Standard ML and a bit on the experimental side for my taste. However it has recently seen much active development in the area of infrastructure[OCamlTools]. For example for graphics it has interfaces to Tk, Gtk+ and OpenGL. There are interfaces for the PostgreSQL and MySQL databases. If you're wondering why I didn't choose OCaml for this book, it's that much of this progress has been made while I've been writing this book. You should certainly look into it.
An alternative in the lazy functional language arena is Haskell[Haskell]. Haskell compiles to machine code but its lazy evaluation tends to make it run slower than SML/NJ. There is good infrastructure support especially if you are programming on Microsoft Windows. It talks COM and CORBA. For graphics there are interfaces for Tk and Gtk+. For databases there are interfaces for PostgreSQL and MySQL and on Windows, ODBC.