mea*_*ory 4 eclipse ocaml functional-programming
我在OCaml工作,使用的环境是Eclipe Mars。当我尝试使用List.iter [1.;3.;2.;-7.;4.;5.] ~f:(fun x -> update rsum x);;它时,出现了一个错误,提示Error: The function applied to this argument has type 'a list -> unit
This argument cannot be applied with label ~f#
意思是这是一本书的例子,可以很好地为他们服务,但是当我尝试使用时,我经常遇到这个错误~f:。有人可以解释一下为什么这行不通吗?如果我知道如何进行这项工作,那也会有所帮助。
| 归档时间: |
|
| 查看次数: |
310 次 |
| 最近记录: |