The new edition of this successful and established textbook retains its two original intentions of explaining how to program in the ML language, and teaching the fundamentals of functional programming. The major change is the early and prominent coverage of modules, which are extensively used throughout. In addition, the first chapter has been totally rewritten to make the book more accessible to students who have no experience of programming languages. The main features of the new Basis Library for the revised version of ML are described, and many new examples are given, e.g. polynomial arithmetic and new ways of treating priority queues. Finally the references have been completely updated.