The (optional) course textbook is Introduction to Programming using SML, by Michael R. Hansen and Hans Rischel. The book's web page includes code for examples in the book and a list of corrections. Be aware that this book uses a different implementation of SML than we will be using, so the exact format of responses and error messages will be slightly different.
It is strongly suggested you read this guide to using SML/NJ.