summaryrefslogtreecommitdiff
path: root/src/nbc/storejudy.sml
blob: c6385bea5dfa1715de70825b43dc0d0edce1db39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
signature STORE_JUDY = sig
	type t
	val load: (int * string) Sequence.t -> t
	val get: t * string -> int option
end

structure StoreJudy :> STORE_JUDY = struct
	type t = Judy.t
	fun load e =
		let
			val j = Judy.create ()
		in
			Sequence.app (fn (count, nmer) => Judy.insert (j, nmer, count)) e
			; j
		end
	val get = Judy.get
end