diff options
author | Calvin <calvin@EESI> | 2013-03-15 15:26:20 -0400 |
---|---|---|
committer | Calvin <calvin@EESI> | 2013-03-15 15:26:20 -0400 |
commit | b632667ce57af89691407bb8668e1512775278ae (patch) | |
tree | b5742cef185f1cc4a7ba6005b5b4116ce7558a01 /src/nbc/storejudy.sml | |
parent | 39e39f82cc38d71018882b0aaaf58255858a7c56 (diff) |
nbc added
Diffstat (limited to 'src/nbc/storejudy.sml')
-rw-r--r-- | src/nbc/storejudy.sml | 17 |
1 files changed, 17 insertions, 0 deletions
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 |