This is a famous book that introduces the reader to computer programming using the Scheme language (a simplified dialect of Lisp).
Chris Rathman has been kind enough to upload translations of the code in the book to various other languages, including OCaml:
The original code mimicked many unwanted features of the Scheme code (particularly sources of run-time error). As Chris is not an expert ML programmer and was having trouble with some of the examples, I decided to lend a helping hand and rewrite much of the code in more idiomatic OCaml.
Although the final two chapters cover the metacircular evaluator (Lisp's EVAL function that was stripped from ML in order to implement static typing) I think the first three chapters present a good opportunity to show how ML can be more concise, expressive, robust and efficient than Lisp the rest of the time.
Random access lists - The F# Journal just published an article: *"Ordinary F# lists are singly-linked immutable lists that permit constant-time prepend and decapitate but coun...
5 weeks ago