【发布时间】:2014-11-07 11:58:09
【问题描述】:
尝试在 eMac 中运行此 sml 代码时出现错误,并且无法弄清楚出了什么问题?请帮忙?
fun nearest(a,[]) = raise Empty
| nearest(a,t::[]) = route(a,t)
| nearest(a,t::s) = Real.min(route(a,t), nearest(a,s);
SML 中的错误:
| nearest(a,t::s) = Real.min(route(a,t), nearest(a,s);
! ^
! Syntax error.
【问题讨论】: