How to use the monet.Nothing function in monet

To help you get started, we’ve selected a few monet 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 char0n / ramda-adjunct / test / neither.js View on Github external
it('accepts fantasy-land applicative functors', function() {
      assert.isTrue(R.equals(RA.neither(Just(true), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(true), Just(false)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(false), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(false), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.neither(Just(true), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Just(true)), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Just(false)), Nothing()));
      assert.isTrue(R.equals(RA.neither(Just(false), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Nothing()), Nothing()));
    });
  }
github char0n / ramda-adjunct / test / notBoth.js View on Github external
it('accepts fantasy-land applicative functors', function() {
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(true)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(true)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(false)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Nothing()), Nothing()));
    });
  }
github char0n / ramda-adjunct / test / notBoth.js View on Github external
it('accepts fantasy-land applicative functors', function() {
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(true)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(true)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(false)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Nothing()), Nothing()));
    });
  }
github char0n / ramda-adjunct / test / neither.js View on Github external
it('accepts fantasy-land applicative functors', function() {
      assert.isTrue(R.equals(RA.neither(Just(true), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(true), Just(false)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(false), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.neither(Just(false), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.neither(Just(true), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Just(true)), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Just(false)), Nothing()));
      assert.isTrue(R.equals(RA.neither(Just(false), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.neither(Nothing(), Nothing()), Nothing()));
    });
  }
github char0n / ramda-adjunct / test / notBoth.js View on Github external
it('accepts fantasy-land applicative functors', function() {
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(true)), Just(false)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(true)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Just(false)), Just(true)));
      assert.isTrue(R.equals(RA.notBoth(Just(true), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(true)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Just(false)), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Just(false), Nothing()), Nothing()));
      assert.isTrue(R.equals(RA.notBoth(Nothing(), Nothing()), Nothing()));
    });
  }