fix bug in dict comparison
This commit is contained in:
parent
41a5335d87
commit
5d028fe030
3 changed files with 39 additions and 7 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { unit } from "../primitives/unit.js";
|
||||
import { RBTreeWrapper } from "../util/rbtree_wrapper.js";
|
||||
import { indent } from "../util/util.js";
|
||||
import { newProduct } from "./product.js";
|
||||
|
|
@ -32,13 +33,13 @@ export const last = dict => dict.tree.end;
|
|||
export const read = iter => {
|
||||
if (iter !== undefined && iter.valid) {
|
||||
return newRight(
|
||||
newProduct(
|
||||
newProduct(iter.key)(iter.value)
|
||||
newProduct
|
||||
(newProduct(iter.key)(iter.value))
|
||||
(iter.clone().next())
|
||||
)
|
||||
);
|
||||
}
|
||||
else {
|
||||
// end of iteration
|
||||
return newLeft(unit);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue