let rec remove_duplicates eq l =
let rec check_duplicates a l = match l with
|[] -> false
|h::t -> if eq a h then true else check_duplicates a t
in match l with
|[] -> []
|h::t -> if (check_duplicates h t) then remove_duplicates eq t else h::(remove_duplicates eq t)
bGV0IHJlYyByZW1vdmVfZHVwbGljYXRlcyBlcSBsID0gCiAgbGV0IHJlYyBjaGVja19kdXBsaWNhdGVzIGEgbCA9IG1hdGNoIGwgd2l0aAogIHxbXSAtPiBmYWxzZQogIHxoOjp0IC0+IGlmIGVxIGEgaCB0aGVuIHRydWUgZWxzZSBjaGVja19kdXBsaWNhdGVzIGEgdAppbiBtYXRjaCBsIHdpdGgKICB8W10gLT4gW10KICB8aDo6dCAtPiBpZiAoY2hlY2tfZHVwbGljYXRlcyBoIHQpIHRoZW4gcmVtb3ZlX2R1cGxpY2F0ZXMgZXEgdCBlbHNlIGg6OihyZW1vdmVfZHVwbGljYXRlcyBlcSB0KQ==