How to use the sanctuary-type-classes.Apply 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-maybe / test / index.js View on Github external
test ('Apply', () => {
    eq (Z.Apply.test (Nothing)) (true);
    eq (Z.Apply.test (Just (Useless))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Apply', () => {
    eq (Z.Apply.test (Left (Useless))) (true);
    eq (Z.Apply.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-either / test / index.js View on Github external
test ('Apply', () => {
    eq (Z.Apply.test (Left (Useless))) (true);
    eq (Z.Apply.test (Right (Useless))) (true);
  });
github sanctuary-js / sanctuary-maybe / test / index.js View on Github external
test ('Apply', () => {
    eq (Z.Apply.test (Nothing)) (true);
    eq (Z.Apply.test (Just (Useless))) (true);
  });
github sanctuary-js / sanctuary-identity / test / index.js View on Github external
test ('Apply', () => {
    eq (Z.Apply.test (Identity (Useless))) (true);
  });
github fluture-js / Fluture / src / dispatchers / ap.js View on Github external
function ap$mval(mval, mfunc){
  if(!Z.Apply.test(mfunc)) throwInvalidArgument('Future.ap', 1, 'be an Apply', mfunc);
  return Z.ap(mval, mfunc);
}
github fantasyland / fantasy-laws / src / Apply.js View on Github external
composition: assert.forall3 (function(u, v, w) {
      return Z.Apply.test (u) &&
             Z.Apply.test (v) &&
             Z.Apply.test (w) &&
             equals (ap (ap (map (compose) (u)) (v)) (w),
                     ap (u) (ap (v) (w)));
    })
github fantasyland / fantasy-laws / src / Apply.js View on Github external
composition: assert.forall3 (function(u, v, w) {
      return Z.Apply.test (u) &&
             Z.Apply.test (v) &&
             Z.Apply.test (w) &&
             equals (ap (ap (map (compose) (u)) (v)) (w),
                     ap (u) (ap (v) (w)));
    })