0

I'm trying to figure out how to run the code Standard Meta Language:

smallest [5, ~4, 3]; returns ~4

fun smallest L =
    if null (tl L)
    then hd L
    else if hd L < smallest (tl L)
         then hd L
         else smallest (tl L);
praseodym
  • 2,134
  • 15
  • 29

2 Answers2

2

You need an SML interpretor, or compilor. There is multiple to choose from, but SML/NJ is most likely the most known/used.

Others include (but are not limited to) Moscow ML (MosML), MLKit and MLton. Where MLKit and MLton are compilers and SML/NJ and MosML are interpreters.

The wikipedia article on SML is properly a good starting point for you to learn some more about SML.

Jesper.Reenberg
  • 5,944
  • 23
  • 31
1

I recommend PolyML. It's got some of the better documentation for ML out there.

Brad Cypert
  • 671
  • 1
  • 8
  • 29