connective icon indicating copy to clipboard operation
connective copied to clipboard

Logical Operators

Open loreanvictor opened this issue 5 years ago • 0 comments

A common practice is to apply logical operators on boolean pins/states. As a result, it would be exceedingly helpful to have them available.

and = (...pins) => pack(...pins).to(map(l => l.every(p => p)));
or = (...pins) => pack(...pins).to(map(l => l.some(p => p)));
not = pin => pin.to(map(p => !p));

loreanvictor avatar Apr 26 '20 10:04 loreanvictor