The assert_equal function from the OUnit2 library has type,
val assert_equal :
?ctxt:test_ctxt ->
?cmp:('a -> 'a -> bool) ->
?printer:('a -> string) ->
?pp_diff:(Format.formatter -> ('a * 'a) -> unit) ->
?msg:string -> 'a -> 'a -> unit
There are only two non-keyword parameters, but you're applying it to four. I would suggest you read at least the OCaml tutorial and learn how functions are applied in OCaml. For example, the piece of code (4 3) in OCaml means apply 4 to 3, where "apply F to Y" means call the function F with argument X. Obviously, 4 is not a function (spoiler, it is a number), so this code doesn't make sense and raises a type error.
It is hard to guess from the information that you provided what is the type of uncurry and what is the type of f, but probably you meant something like this,
assert_equal 7 (uncurry f 4 3)
Which says, that we expect 7 when we uncurry the function f and apply it to 4 and 3.
The
assert_equalfunction from the OUnit2 library has type,There are only two non-keyword parameters, but you're applying it to four. I would suggest you read at least the OCaml tutorial and learn how functions are applied in OCaml. For example, the piece of code
(4 3)in OCaml means apply4to3, where "apply F to Y" means call the function F with argument X. Obviously,4is not a function (spoiler, it is a number), so this code doesn't make sense and raises a type error.It is hard to guess from the information that you provided what is the type of
uncurryand what is the type off, but probably you meant something like this,Which says, that we expect
7when we uncurry the functionfand apply it to4and3.where
fis probablycurry (+)