How to use the max function from ramda
Find comprehensive JavaScript ramda.max code examples handpicked from public code repositorys.
GitHub: trick77/bc-src
555 556 557 558 559 560 561 562 563
closestLowestHash(height) { if (!height) { this._logger.warn(`height not given for closest hash to ${height}, returning with BTC syncronization stop`); } const lowerBound = max(height - 5000, 1); const availableBlockNumbers = Object.keys(this._hashTable); let found = false; let startHeight = height;
12
5
7
GitHub: alvaro-cuesta/aoc-js
28 29 30 31 32 33 34 35 36 37 38 39
}), [R.empty, R.identity], ) const maxHeightInInput = R.reduce( (acc, row) => R.max(acc, R.reduce(R.max, -Infinity, R.map(R.last, row))), -Infinity, ) const moveSand = (board, pos, solidFloorHeight) => {
0
1
0
2922 2923 2924 2925 2926 2927 2928 2929 2930 2931
* @param {*} b * @return {*} * @see R.maxBy, R.min * @example * * R.max(789, 123); //=> 789 * R.max('a', 'b'); //=> 'b' */ var max = _curry2(function max(a, b) { return b > a ? b : a;
0
0
0
+ 35 other calls in file
GitHub: jcla1/AdventOfCode
6 7 8 9 10 11 12 13 14 15 16 17
const toCoord = R.compose(U.toIntArr, R.split(',')); const transCoord = R.curry(([[u, v], _], [x, y]) => [x - u, y - v]); const drawLine = (board, [[x1, y1], [x2, y2]]) => { const len = R.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); for (let i = 0; i <= len; i++) { if (x1 === x2) { board[x1][R.min(y1, y2) + i] = '#'; } else {
0
0
0
18 19 20 21 22 23 24 25 26 27
inotifyInstance = unless(complement(isNil), createDefaultInotifyInstance)(inotifyInstance); return inotifyInstance } function getMaskChainVariantsMaxMasks(maskChains) { return reduce((maxMasks, maskChain) => max(length(maskChain), maxMasks), 0, maskChains); } // throws error function removeWatcher(watchDescriptor) {
0
0
3
ramda.clone is the most popular function in ramda (30311 examples)