【发布时间】:2015-07-22 18:19:48
【问题描述】:
let IndexOf (searchWithin:byte[])(searchFor:byte[])(startIndex:int):(int) =
//Function defination
0
//calling thisfunction using below
let endIndex = IndexOf(data, delimiterBytes, startIndex)
//data is type of byte[], delimiterBytes is also type of byte[] and
//startIndex is type of interger.
我收到错误消息,例如“此表达式的类型应为字节 [],但此处的类型为 'a * 'b * 'c”。我不明白 'a * 'b * 'c 的含义以及为什么它会显示错误。谢谢。
【问题讨论】:
-
您使用的是柯里化形式而不是元组形式。这注定是重复的
-
如何在“IndexOf”函数中使用元组形式?