functor (E : Eq-> sig type a = E.a ref val eq : a -> a -> bool end