How to use the sanctuary-type-classes.Setoid 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 ('Setoid', () => {
    eq (Z.Setoid.test (Identity (Useless))) (false);
    eq (Z.Setoid.test (Identity (/(?:)/))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Setoid', () => {
    eq (Z.Setoid.test (Nothing)) (true);
    eq (Z.Setoid.test (Just (Useless))) (false);
    eq (Z.Setoid.test (Just (/(?:)/))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Setoid', () => {
    eq (Z.Setoid.test (Nothing)) (true);
    eq (Z.Setoid.test (Just (Useless))) (false);
    eq (Z.Setoid.test (Just (/(?:)/))) (true);
  });
github xodio / hm-def / test / signature.spec.js View on Github external
it ('should resolve multiple contraints', () => {
    const tcs = [Z.Monoid, Z.Setoid];
    const {constraints} = resolve ($) (tcs) ($.env) ('foo :: (Monoid a, Setoid b) => a -> b');
    assert.deepEqual (constraints, {a: [Z.Monoid], b: [Z.Setoid]});
  });
github sanctuary-js / sanctuary-identity / test / index.js View on Github external
test ('Setoid', () => {
    eq (Z.Setoid.test (Identity (Useless))) (false);
    eq (Z.Setoid.test (Identity (/(?:)/))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Setoid', () => {
    eq (Z.Setoid.test (Left (Useless))) (false);
    eq (Z.Setoid.test (Left (/(?:)/))) (true);
    eq (Z.Setoid.test (Right (Useless))) (false);
    eq (Z.Setoid.test (Right (/(?:)/))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Setoid', () => {
    eq (Z.Setoid.test (Left (Useless))) (false);
    eq (Z.Setoid.test (Left (/(?:)/))) (true);
    eq (Z.Setoid.test (Right (Useless))) (false);
    eq (Z.Setoid.test (Right (/(?:)/))) (true);
  });
github fantasyland / fantasy-laws / src / Setoid.js View on Github external
symmetry: assert.forall2 (function(a, b) {
    return Z.Setoid.test (a) &&
           Z.Setoid.test (b) &&
           Z.equals (a, b) === Z.equals (b, a);
  }),
github fantasyland / fantasy-laws / src / Setoid.js View on Github external
reflexivity: assert.forall1 (function(a) {
    return Z.Setoid.test (a) &&
           Z.equals (a, a);
  }),