在fsi中,我输入了:
> let f (x:'a) (y:'b)=x + y
- ;;
let f (x:'a) (y:'b)=x + y
----------------------^
stdin(25,23): warning FS0064: This construct causes code to be less generic
than indicated by the type annotations. The type variable 'b has been
constrained to be type 'int'.
val f : x:int -> y:int -> int
好吧,我的目标是定义" f"能够接收2个参数,但似乎解释器无法理解我的需要并解析f为int-> int-> int?为什么呢?