试图弄清楚如何运行代码标准元语言

时间:2013-01-11 01:05:17

标签: sml ml

我正在试图弄清楚如何运行代码标准元语言:

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);

2 个答案:

答案 0 :(得分:2)

您需要一个SML解释器或compilor。有多种可供选择,但SML/NJ最有可能是最知名/最常用的。

其他包括(但不限于)Moscow ML(MosML),MLKitMLton。 MLKit和MLton是编译器,SML / NJ和MosML是解释器。

wikipedia article on SML对您来说是一个很好的起点,可以让您更多地了解SML。

答案 1 :(得分:1)

我推荐PolyML。它有一些更好的ML文档。