Commit aa0fd778 authored by POTTIER Francois's avatar POTTIER Francois

Added [KeywordSet.map].

parent 1699907b
......@@ -72,9 +72,16 @@ let posvar s w f =
(* ------------------------------------------------------------------------- *)
(* Sets of keywords. *)
module KeywordSet =
Set.Make (struct
module KeywordSet = struct
include Set.Make (struct
type t = keyword
let compare = compare
end)
let map f keywords =
fold (fun keyword accu ->
add (f keyword) accu
) keywords empty
end
......@@ -54,5 +54,11 @@ and keyword =
val posvar: subject -> where -> flavor -> string
(* Sets of keywords. *)
module KeywordSet : Set.S with type elt = keyword
module KeywordSet : sig
include Set.S with type elt = keyword
val map: (keyword -> keyword) -> t -> t
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment