Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test ('Comonad', () => {
eq (Z.Comonad.test (Nothing)) (false);
eq (Z.Comonad.test (Just (Identity (0)))) (false);
});
test ('Comonad', () => {
eq (Z.Comonad.test (Left (Identity (0)))) (false);
eq (Z.Comonad.test (Right (Identity (0)))) (false);
});
test ('Comonad', () => {
eq (Z.Comonad.test (Left (Identity (0)))) (false);
eq (Z.Comonad.test (Right (Identity (0)))) (false);
});
test ('Comonad', () => {
eq (Z.Comonad.test (Identity (Useless))) (true);
});
test ('Comonad', () => {
eq (Z.Comonad.test (Nothing)) (false);
eq (Z.Comonad.test (Just (Identity (0)))) (false);
});
rightIdentity: assert.forall2 (function(w, f) {
return Z.Comonad.test (w) &&
equals (compose (extract) (extend (f)) (w),
f (w));
})
leftIdentity: assert.forall1 (function(w) {
return Z.Comonad.test (w) &&
equals (extend (extract) (w),
w);
}),