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