SML 中的原型功能
我有两个函数,f
和 g
,它们递归地相互调用。 不幸的是,当f
调用g
时,它还没有被声明,所以我得到一个“未绑定变量”错误。 我如何在 SML/NJ 中构建此函数的原型(或任何等效词汇)?
I have two functions, f
and g
, which call each other recursively. Unfortunately, when f
calls g
, it has not yet been declared, so I get an "unbound variable" error. How can I prototype (or whatever the equivalent vocabulary is) this function in SML/NJ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
和
:更多信息 在这里。
Use
and
:More info here.
相互递归。 在两个函数之间使用
and
而不是fun
。Mutual Recursion. Use
and
instead offun
between the two functions.