Example 1 — Official Black Card
Both predicates see the same card. Suit must be clubs or spades. One hit is enough to yield true.
const isClub = R.propEq('♣︎', 'suit');
const isSpade = R.propEq('♠︎', 'suit');
const isBlackCard = R.anyPass([isClub, isSpade]);
isBlackCard({rank: '10', suit: '♣︎'});
//=> true
isBlackCard({rank: 'Q', suit: '♠︎'});
//=> true
isBlackCard({rank: 'Q', suit: '♦︎'});
//=> false How It Works
Clubs pass isClub, so the leftover is true without needing spades. Spades pass isSpade. Diamonds miss both, so the leftover is false. That is the docs sample from ramdajs.com. In Ramda 0.30, propEq is value then name.
