(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// a better name would be - if predicate is True then success, else not success. | |
// using basic logic we can now create logic functions that compute only as much as required | |
// anyBool :: (a -> Bool) -> Bool -> [a] -> Bool | |
function anyBool(pred,success,xs) { | |
for (var i = 0; i < xs.length; i++) { | |
if (pred(xs[i]) === success) { | |
return success }} | |
return !success } |