I am trying to import the following OCaml code in to utop:
let rec insert (x : 'a) (l : 'a list) : 'a list =
match l with
| [] -> [ x ]
| hd :: tl ->
if x = hd then l
else if is_sorted (x :: l) then x :: l
else hd :: insert x tl
When I import it though its signature is
val insert : int -> int list -> int list = <fun>
I am confused why its signature is in terms of int rather than 'a. Could someone explain to me why this is?