Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test ('Apply', () => {
eq (Z.Apply.test (Nothing)) (true);
eq (Z.Apply.test (Just (Useless))) (true);
});
test ('Apply', () => {
eq (Z.Apply.test (Left (Useless))) (true);
eq (Z.Apply.test (Right (Useless))) (true);
});
test ('Apply', () => {
eq (Z.Apply.test (Left (Useless))) (true);
eq (Z.Apply.test (Right (Useless))) (true);
});
test ('Apply', () => {
eq (Z.Apply.test (Nothing)) (true);
eq (Z.Apply.test (Just (Useless))) (true);
});
test ('Apply', () => {
eq (Z.Apply.test (Identity (Useless))) (true);
});
function ap$mval(mval, mfunc){
if(!Z.Apply.test(mfunc)) throwInvalidArgument('Future.ap', 1, 'be an Apply', mfunc);
return Z.ap(mval, mfunc);
}
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)));
})
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)));
})