How to use the sanctuary-type-classes.Ord 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 ('Ord', () => {
    eq (Z.Ord.test (Identity (Useless))) (false);
    eq (Z.Ord.test (Identity (/(?:)/))) (false);
    eq (Z.Ord.test (Identity (0))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Ord', () => {
    eq (Z.Ord.test (Nothing)) (true);
    eq (Z.Ord.test (Just (Useless))) (false);
    eq (Z.Ord.test (Just (/(?:)/))) (false);
    eq (Z.Ord.test (Just (0))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Ord', () => {
    eq (Z.Ord.test (Left (Useless))) (false);
    eq (Z.Ord.test (Left (/(?:)/))) (false);
    eq (Z.Ord.test (Left (0))) (true);
    eq (Z.Ord.test (Right (Useless))) (false);
    eq (Z.Ord.test (Right (/(?:)/))) (false);
    eq (Z.Ord.test (Right (0))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Ord', () => {
    eq (Z.Ord.test (Left (Useless))) (false);
    eq (Z.Ord.test (Left (/(?:)/))) (false);
    eq (Z.Ord.test (Left (0))) (true);
    eq (Z.Ord.test (Right (Useless))) (false);
    eq (Z.Ord.test (Right (/(?:)/))) (false);
    eq (Z.Ord.test (Right (0))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Ord', () => {
    eq (Z.Ord.test (Nothing)) (true);
    eq (Z.Ord.test (Just (Useless))) (false);
    eq (Z.Ord.test (Just (/(?:)/))) (false);
    eq (Z.Ord.test (Just (0))) (true);
  });
github sanctuary-js / sanctuary-identity / test / index.js View on Github external
test ('Ord', () => {
    eq (Z.Ord.test (Identity (Useless))) (false);
    eq (Z.Ord.test (Identity (/(?:)/))) (false);
    eq (Z.Ord.test (Identity (0))) (true);
  });
github fantasyland / fantasy-laws / src / Ord.js View on Github external
antisymmetry: assert.forall2 (function(a, b) {
    return Z.Ord.test (a) &&
           Z.Ord.test (b) &&
           (Z.lte (a, b) && Z.lte (b, a) ? Z.equals (a, b) : true);
  }),
github fantasyland / fantasy-laws / src / Ord.js View on Github external
totality: assert.forall2 (function(a, b) {
    return Z.Ord.test (a) &&
           Z.Ord.test (b) &&
           (Z.lte (a, b) || Z.lte (b, a));
  }),