UNPKG

rubico

Version:

[a]synchronous functional programming

14 lines (12 loc) 305 B
/** * @name reducerAnySync * * @synopsis * ```coffeescript [specscript] * reducerAnySync(predicate T=>boolean) -> anyReducer (any, any)=>any * ``` */ const reducerAnySync = predicate => function anyReducer(result, item) { return result ? true : predicate(item) } module.exports = reducerAnySync