Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to use Set Datatype
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@j...>
Subject: Re: [Caml-list] How to use Set Datatype
On Friday 10 December 2004 19:44, Micha wrote:
> module StringSet = Set.Make (struct type t = string   let compare = compare
>  end);;

As the "String" module implements both a type "t" and a "compare" function, 
you can just write:

# module StringSet = Set.Make(String);;
...

Cheers,
Jon.