有人可以解释一下:“g的描述”吗? f1如何取得单位并返回一个int &其余的我也很困惑! (* Description of g:
* g takes f1: unit -> int, f2: string -> int and p: pattern, and returns
* an int. f1 and f2 are used to specify what number to be
我需要编写一个函数,它需要一个列表并将其分成2个列表。第一个列表将保存位于奇数位置的元素,第二个列表保存位于偶数位置的元素。这里是我的尝试,给了我以下警告: 警告:类型乏不是一概而论,因为 值的限制被实例化虚拟类型(X1,X2,...) 如何提高呢? fun splt (lst: int list) =
let
fun splt2 (lst: int list, count:
我写了一个函数来处理异常,如果我们得到了R2 = 0,I2 = 0,但是当我运行程序我得到这个错误: operatii.ml:12: error: Type error in function application.
Function: = : ''a * ''a -> bool
Argument: (r2, 0.0) : real * real
Reason: C