标准毫升快速排序
我正在尝试解决机器学习中的问题,但我有点卡住了。请原谅我,这是微不足道的代码,但回答它可以解决我的大部分问题。
代码:
val sorted = ([3, 2, 1], [5, 8, 4]);
fun loop ([]) = []
| loop (x::xs) = [3] @ [4];
loop sorted;
错误:
Error-Can't unify 'a list with int list * int list (Incompatible types) Found near loop (sorted)
Static errors (pass2)
I'm trying to solve a problem in ml and I'm slightly stuck. forgive me that this is trivial code, but answering it will solve most of my problem.
Code:
val sorted = ([3, 2, 1], [5, 8, 4]);
fun loop ([]) = []
| loop (x::xs) = [3] @ [4];
loop sorted;
Error:
Error-Can't unify 'a list with int list * int list (Incompatible types) Found near loop (sorted)
Static errors (pass2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sorted
是两个列表的元组。loop
采用列表参数sorted
is a tuple of two lists.loop
takes a list argument