From b632667ce57af89691407bb8668e1512775278ae Mon Sep 17 00:00:00 2001 From: Calvin Date: Fri, 15 Mar 2013 15:26:20 -0400 Subject: nbc added --- src/nbc/storejudy.sml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/nbc/storejudy.sml (limited to 'src/nbc/storejudy.sml') diff --git a/src/nbc/storejudy.sml b/src/nbc/storejudy.sml new file mode 100644 index 0000000..c6385be --- /dev/null +++ b/src/nbc/storejudy.sml @@ -0,0 +1,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 -- cgit v1.2.3