13993Re: "ocaml_beginners":: how to get an IntSet and a FloatSet with batteries
- Jan 6, 20142014/1/6, Francois Berenger <berenger@...>:
> Hi,I don't know if there is an already cooked solution, so in my
> I currently use Set.Make but I guess there are already
> cooked alternatives.
> Additional bonus points: how to add the functions of_list and to_list to
> those sets?
> to_list should be an alias for elements
> Thanks a lot,
ignorance, if my boss would request me to produce some strongly
copylefted code I would probably do something like:
$ ocaml nums.cma str.cma unix.cma bigarray.cma -I +batteries batteries.cma
OCaml version 4.01.0
# module IntSet = Set.Make(BatInt) ;;
# module FloatSet = Set.Make(BatFloat) ;;
For a ready to use IntSet maybe it exists:
$ strings `ocamlc -where`/batteries/batteries.cma |grep IntSet
$ strings `ocamlc -where`/batteries/batteries.cma |grep IntFloat
but I've been unable to find it in the available amount of time.
In hope that it can help someone
- << Previous post in topic Next post in topic >>