fix error in static merge algorithm. progress with merging of dictionary-operations
This commit is contained in:
parent
5d028fe030
commit
d5821c9cb9
4 changed files with 115 additions and 71 deletions
|
|
@ -15,7 +15,7 @@ export const emptyDict = compareFn => RBTreeWrapper.new((x, y) => compareFn(x)(y
|
|||
|
||||
export const has = dict => key => dict.tree.get(key) !== undefined;
|
||||
export const get = dict => key => dict.tree.get(key);
|
||||
export const set = dict => key => value => new RBTreeWrapper(dict.tree.remove(key).insert(key, value), inspectDict);
|
||||
export const set = key => value => dict => new RBTreeWrapper(dict.tree.remove(key).insert(key, value), inspectDict);
|
||||
export const remove = dict => key => new RBTreeWrapper(dict.tree.remove(key), inspectDict);
|
||||
export const length = dict => dict.tree.length;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const mkType = makeTypeParser({
|
|||
export const ModuleDict = [
|
||||
["emptyDict", newDynamic(emptyDict)(mkType("(a -> a -> Ordering) -> (a => b) "))],
|
||||
["has" , newDynamic(has )(mkType("(a => b) -> a -> Bool "))],
|
||||
["set" , newDynamic(set )(mkType("(a => b) -> a -> b -> (a => b) "))],
|
||||
["set" , newDynamic(set )(mkType("a -> b -> (a => b) -> (a => b) "))],
|
||||
["remove" , newDynamic(remove )(mkType("(a => b) -> a -> (a => b) "))],
|
||||
["length" , newDynamic(length )(mkType("(a => b) -> Int "))],
|
||||
["fold" , newDynamic(fold )(mkType("(c -> a -> b -> c) -> c -> (a => b) -> c "))],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue