simplify: no distinction between generic types and 'normal' types.
This commit is contained in:
parent
b4826605af
commit
a664ddac8a
27 changed files with 535 additions and 360 deletions
|
|
@ -1,12 +1,17 @@
|
|||
// Total ordering of composed types
|
||||
|
||||
import { compareNumbers } from "./primitives.js"
|
||||
import { compareNumbers, compareStrings } from "./primitives.js"
|
||||
import { get, length as lengthLs } from "../structures/list.js";
|
||||
import { read as readSet, length as lengthSet, first as firstSet } from "../structures/set.js";
|
||||
import { read as readDict, length as lengthDict, first as firstDict } from "../structures/dict.js";
|
||||
import { getLeft, getRight } from "../structures/product.js";
|
||||
import { match } from "../structures/sum.js";
|
||||
|
||||
export const compareFunctions = _compareInput => _compareOutput => x => y => {
|
||||
// dirty but does the job
|
||||
return compareStrings(x.toString())(y.toString());
|
||||
}
|
||||
|
||||
export const compareLists = compareElems => x => y => {
|
||||
return compareNumbers(lengthLs(x))(lengthLs(y))
|
||||
|| (() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue