<!-- -*- markdown -*- --> The SML Basis Prime Demo ======================== This repository contains a number of code examples demonstrating the use of the [SML Basis Prime](http://bitbucket.org/robsimmons/prime) (SBP). It includes the SBP itself, though it is recommended that you download SBP from the [main page](http://bitbucket.org/robsimmons/prime). With the exception of the examples described immediately below, all the examples are designed to be run with SML/NJ using the command "`sml <filename>`" while sitting in the root directory (the directory where this README file is). Using the SBP with different ML implementations ----------------------------------------------- * **`smlnj/demo.cm`** (not yet) * **`mlton/demo.mlb`** (not yet) MLton can also be executed with the SML/NJ command by running "`mlton smlnj/sources.cm`". * **PolyML** (not yet) Monads ------ Idioms ------ Idioms ("applicative functors" in Haskell) are flexible ways of programming with state. The `idioms` directeory contains a few examples. * **`idioms/evaluation.sml`** - Evaluating expressions in an environment using the environment idiom; demonstrates the use of both the `Idiom` and `IdiomK` functors for defining idioms. * **`idioms/susp.sml`** - Gives an example of the `Susp` idiom for memoized suspensions. * **`idioms/maybesusp.sml`** - Two idioms can always be composed to create another idiom - a fact that is not true of monads. This file gives a simple example of of composing `Susp` with `Maybe` - in both direcions.
stacyw80 began watching robsimmons/primedemo
82544f3 - Still fighting with Markdown, remarkably (hahah pun)
313edc7 - Fighting with Markdown
e261efa - make filename not a link
e621b80 - Add quotes
392ab32 - Make everything fixed-width because that looks reasonably good.
cc174c2 - Add README
54e16b1 - modify intro for evaluation.sml
32d86fc - Some annotations and some spell checking
32c99b8 - Minor clarification to susp/maybesusp demos