Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test ('Contravariant', () => {
eq (Z.Contravariant.test (Nothing)) (false);
eq (Z.Contravariant.test (Just (Math.sqrt))) (false);
});
test ('Contravariant', () => {
eq (Z.Contravariant.test (Left (Math.sqrt))) (false);
eq (Z.Contravariant.test (Right (Math.sqrt))) (false);
});
test ('Contravariant', () => {
eq (Z.Contravariant.test (Identity (Math.sqrt))) (false);
});
test ('Contravariant', () => {
eq (Z.Contravariant.test (Nothing)) (false);
eq (Z.Contravariant.test (Just (Math.sqrt))) (false);
});
test ('Contravariant', () => {
eq (Z.Contravariant.test (Left (Math.sqrt))) (false);
eq (Z.Contravariant.test (Right (Math.sqrt))) (false);
});
identity: assert.forall1 (function(u) {
return Z.Contravariant.test (u) &&
equals (contramap (identity) (u),
u);
}),
composition: assert.forall3 (function(u, f, g) {
return Z.Contravariant.test (u) &&
equals (contramap (compose (f) (g)) (u),
compose (contramap (g)) (contramap (f)) (u));
})