fix missing return stmt
This commit is contained in:
parent
28f60e77be
commit
c51e517b66
1 changed files with 10 additions and 10 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
|
// Total ordering of composed types
|
||||||
|
|
||||||
import { compareNumbers } from "./primitives.js"
|
import { compareNumbers } from "./primitives.js"
|
||||||
import { get, length as lengthLs } from "../structures/list.js";
|
import { get, length as lengthLs } from "../structures/list.js";
|
||||||
import { read, length as lengthSet } from "../structures/set.js";
|
import { read, length as lengthSet } from "../structures/set.js";
|
||||||
import { constructorProduct, getLeft, getRight } from "../structures/product.js";
|
import { constructorProduct, getLeft, getRight } from "../structures/product.js";
|
||||||
import { match } from "../structures/sum.js";
|
import { match } from "../structures/sum.js";
|
||||||
import { makeGeneric } from "../generics/generics.js";
|
|
||||||
import { lsType } from "../structures/types.js";
|
|
||||||
|
|
||||||
// (a -> a -> Int) -> [a] -> [a] -> Int
|
// (a -> a -> Int) -> [a] -> [a] -> Int
|
||||||
export const compareLists = compareElems => x => y => {
|
export const compareLists = compareElems => x => y => {
|
||||||
|
|
@ -54,7 +54,7 @@ export const compareSets = compareElems => x => y => {
|
||||||
// but to be consistent with the other comparison-functions, we don't.
|
// but to be consistent with the other comparison-functions, we don't.
|
||||||
(keyY => nextY => compareElems(keyX)(keyY) || iterate(nextX)(nextY))
|
(keyY => nextY => compareElems(keyX)(keyY) || iterate(nextX)(nextY))
|
||||||
(0)) // end of set y (we'll never get here because sets are same size)
|
(0)) // end of set y (we'll never get here because sets are same size)
|
||||||
(0) // end of set x;
|
(0); // end of set x
|
||||||
iterate(first(x))(first(y));
|
return iterate(first(x))(first(y));
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue