From: Michal M. <mal...@pl...> - 2003-06-17 07:22:20
|
On Tue, Jun 17, 2003 at 01:12:32PM +1000, John Max Skaller wrote: > 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. What about: let s1 = ExtSet.make cmp1 in let s2 = ExtSet.make cmp2 in ... let s = ExtSet.union s1 s2 ? -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h |