【发布时间】:2013-01-18 02:54:35
【问题描述】:
我正在试图弄清楚如何运行代码标准元语言:
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);
【问题讨论】:
我正在试图弄清楚如何运行代码标准元语言:
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);
【问题讨论】:
您需要一个 SML 解释器或编译器。有多个可供选择,但SML/NJ 很可能是最知名/最常用的。
其他包括(但不限于)Moscow ML (MosML)、MLKit 和 MLton。其中 MLKit 和 MLton 是编译器,而 SML/NJ 和 MosML 是解释器。
wikipedia article on SML 是您进一步了解 SML 的良好起点。
【讨论】:
我推荐 PolyML。它有一些更好的 ML 文档。
【讨论】: