How to use the sanctuary-type-classes.Bifunctor function in sanctuary-type-classes

To help you get started, we’ve selected a few sanctuary-type-classes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanctuary-js / sanctuary-identity / test / index.js View on Github external
test ('Bifunctor', () => {
    eq (Z.Bifunctor.test (Identity ([]))) (false);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Bifunctor', () => {
    eq (Z.Bifunctor.test (Left (Useless))) (true);
    eq (Z.Bifunctor.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Bifunctor', () => {
    eq (Z.Bifunctor.test (Nothing)) (false);
    eq (Z.Bifunctor.test (Just ([]))) (false);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Bifunctor', () => {
    eq (Z.Bifunctor.test (Left (Useless))) (true);
    eq (Z.Bifunctor.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Bifunctor', () => {
    eq (Z.Bifunctor.test (Nothing)) (false);
    eq (Z.Bifunctor.test (Just ([]))) (false);
  });
github fluture-js / Fluture / src / dispatchers / bimap.js View on Github external
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);
}
github fantasyland / fantasy-laws / src / Bifunctor.js View on Github external
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));
    })
github fantasyland / fantasy-laws / src / Bifunctor.js View on Github external
identity: assert.forall1 (function(p) {
      return Z.Bifunctor.test (p) &&
             equals (bimap (identity) (identity) (p),
                     p);
    }),