0

Inside fsi, I have typed:

> 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

Well, i aim to define "f" to be able to receive 2 parameters, but seems the interpreter fails to understand my need and parse f as int->int->int? Why?

Hind Forsum
  • 9,717
  • 13
  • 63
  • 119

0 Answers0