1
逻辑:SML语法错误
eploy(列表,常数)
if list is empty then return: 0; else return: (first_element + constant*eploy(rest_of_the_elements, constant)
我已经写了下面的代码:
fun eploy(xs, x1:int) =
if null xs
then (0)
else (x::xs') => x + x1*eploy(xs',x1)
eploy([1,2],4);