function foo that has the type ’a * ’a -> int
So I tried writing some prog:
fun foo(x,y)=6;(*here the type is ’a * ’b -> int*)
fun foo(x,x) =5; (*gives error cause of two x*)
fun foo(x,y) = if true then x else y; (give 'a * 'a -> 'a)
What should I do to get ’a * ’a -> int
?
thanks