Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test ('Bifunctor', () => {
eq (Z.Bifunctor.test (Identity ([]))) (false);
});
test ('Bifunctor', () => {
eq (Z.Bifunctor.test (Left (Useless))) (true);
eq (Z.Bifunctor.test (Right (Useless))) (true);
});
test ('Bifunctor', () => {
eq (Z.Bifunctor.test (Nothing)) (false);
eq (Z.Bifunctor.test (Just ([]))) (false);
});
test ('Bifunctor', () => {
eq (Z.Bifunctor.test (Left (Useless))) (true);
eq (Z.Bifunctor.test (Right (Useless))) (true);
});
test ('Bifunctor', () => {
eq (Z.Bifunctor.test (Nothing)) (false);
eq (Z.Bifunctor.test (Just ([]))) (false);
});
function bimap$lmapper$rmapper(lmapper, rmapper, m){
if(!Z.Bifunctor.test(m)) throwInvalidArgument('Future.bimap', 2, 'be a Bifunctor', m);
return Z.bimap(lmapper, rmapper, m);
}
composition: assert.forall5 (function(p, f, g, h, i) {
return Z.Bifunctor.test (p) &&
equals (bimap (compose (f) (g)) (compose (h) (i)) (p),
compose (bimap (f) (h)) (bimap (g) (i)) (p));
})
identity: assert.forall1 (function(p) {
return Z.Bifunctor.test (p) &&
equals (bimap (identity) (identity) (p),
p);
}),