How to use the sanctuary-type-classes.Alt 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 ('Alt', () => {
    eq (Z.Alt.test (Identity ([]))) (false);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Alt', () => {
    eq (Z.Alt.test (Left (Useless))) (true);
    eq (Z.Alt.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Alt', () => {
    eq (Z.Alt.test (Left (Useless))) (true);
    eq (Z.Alt.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Alt', () => {
    eq (Z.Alt.test (Nothing)) (true);
    eq (Z.Alt.test (Just (Useless))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Alt', () => {
    eq (Z.Alt.test (Nothing)) (true);
    eq (Z.Alt.test (Just (Useless))) (true);
  });
github fluture-js / Fluture / src / dispatchers / alt.js View on Github external
function alt$left(left, right){
  if(!Z.Alt.test(right)) throwInvalidArgument('alt', 1, 'be an Alt', right);
  return Z.alt(left, right);
}
github fantasyland / fantasy-laws / src / Alt.js View on Github external
distributivity: assert.forall3 (function(a, b, f) {
      return Z.Alt.test (a) &&
             Z.Alt.test (b) &&
             equals (map (f) (alt (a) (b)),
                     alt (map (f) (a)) (map (f) (b)));
    })
github fantasyland / fantasy-laws / src / Alt.js View on Github external
associativity: assert.forall3 (function(a, b, c) {
      return Z.Alt.test (a) &&
             Z.Alt.test (b) &&
             Z.Alt.test (c) &&
             equals (alt (alt (a) (b)) (c),
                     alt (a) (alt (b) (c)));
    }),