From: Nicolas C. <war...@fr...> - 2003-06-17 03:29:21
|
> People keep saying that they can cut and paste the > Functor based Set and Map to get a polymorphic version > using the builtin-compare, so that: > > let s = ExtSet.empty in > let s = Ext.set add_element s 0 > > for example, works (the type is deduced like for a list > or Hashtble, rather than being manually instantiated.) > > Is there a plan to put these into Extlib? > Another option would be > > let s = ExtSet.make cmp in .. > > where cmp is suitable comparator. Yes, we would actually need this one , in a ploymorphic defunctorized way. That was my point when I sent the BinTree module, but it's not so good actually. Instead of using Set I would prefer being able to "shade" elements just like Hashtable is doing so one can simply shift to/from Hashtable/ "ExtSet" with only replacing the module name . This way we need to have a compatible interface and behavior. Nicolas Cannasse |