We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I came up with these:
type Comp = { #less; #equal; #greater }; // Comparison combinators public func compare2<A, B>(ca : (A, A) -> Comp, cb : (B, B) -> Comp) : ((A, B), (A, B)) -> Comp = func((a1 : A, b1 : B), (a2 : A, b2 : B)) : Comp = switch (ca(a1, a2)) { case (#equal) cb(b1, b2); case other other }; public func compare3<A, B, C>(ca : (A, A) -> Comp, cbc : ((B, B) -> Comp, (C, C) -> Comp)) : ((A, (B, C)), (A, (B, C))) -> Comp = compare2(ca, compare2 cbc);
We could have a helper module giving these a home?
Tracked here too: https://dfinity.atlassian.net/browse/LANG-331
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I came up with these:
We could have a helper module giving these a home?
Tracked here too: https://dfinity.atlassian.net/browse/LANG-331
The text was updated successfully, but these errors were encountered: