This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// custom provider to improve lists performance | |
final currentModel = ScopedProvider<Category>( | |
(_) => throw UnimplementedError(), | |
); | |
// used to display snackbars | |
final exceptionProvider = StateProvider<CustomException>( | |
(_) => null, | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compose = (...fns) => (...args) => fns.reduceRight((acc, fn) => [fn(...acc)], args)[0]; | |
// sub :: (a, b) -> a | |
const sub = curry((a, b) => b - a); | |
const mathPipeline = compose(increment, sub(2), add(4)); | |
mathPipeline(10);// 13 |