How to use the remove function from ramda
Find comprehensive JavaScript ramda.remove code examples handpicked from public code repositorys.
GitHub: jfix/geoip-converter
79 80 81 82 83 84 85 86 87 88 89
}) const cleanUpCells = transform((line) => { const newLine = R.pipe( R.remove(0, 1), R.remove(6, 5) )(line) return newLine })
0
1
0
+ 3 other calls in file
3939 3940 3941 3942 3943 3944 3945 3946 3947 3948
* @param {Number} count The number of elements to remove * @param {Array} list The list to remove from * @return {Array} A new Array with `count` elements from `start` removed. * @example * * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] */ var remove = _curry3(function remove(start, count, list) { return _concat(_slice(list, 0, Math.min(start, list.length)), _slice(list, Math.min(list.length, start + count))); });
0
0
0
+ 17 other calls in file
GitHub: octachrome/t2
119 120 121 122 123 124 125 126 127 128
R.map(R.nth(1)) ) (game), pushDeck_s: role => liftDeck(State(deck => Pair(null, R.insert(0, role, deck)))), popDeck_s: () => liftDeck(State(deck => Pair(deck[0], R.remove(0, 1, deck)))), shuffleDeck_s: () => liftDeck(State.get()).chain( deck => liftRand(Rand.shuffle(deck))).chain( deck => liftDeck(State.put(deck))),
0
0
0
+ 6 other calls in file
GitHub: octachrome/t2
40 41 42 43 44 45 46 47 48 49 50 51
const nextGen = gen => R.append(pureRandom.randUint(gen), R.slice(1, 4, gen)); const mkStdGen = (seed, n) => seed ? R.reduceRight(R.compose, R.identity, R.repeat(nextGen, n || 10))(PRIMES.map(p => p * seed)) : pureRandom.genSeed(); const random = (seed, min, max) => Math.round(min + pureRandom.randUint(seed) / UINT32_MAX * (max - min)); const foldM = (f, a, list) => { const foldMonadicAcc = (f, ma, list) => list.length == 0 ? ma : ma.chain(a => foldMonadicAcc(f, f(a, list[0]), R.remove(0, 1, list))); return foldMonadicAcc(f, State.of(a), list); }; const mapM = (f, list) => list.length == 0 ? State.of([]) :
0
0
0
+ 14 other calls in file
53 54 55 56 57 58 59 60 61 62 63
isAssignment(selector), R.complement(isMlhs(parentType)) ); const printNonIndexEmitters = (path, options, print, selector) => { const argumentNodes = R.remove(0, 2, R.prop("children", path.getValue()) ); const parent = path.getParentNode();
0
0
0
1 2 3 4 5 6 7 8 9 10 11 12
const permutations = (tokens, subperms = [[]]) => R.isEmpty(tokens) ? subperms : R.addIndex(R.chain)((token, idx) => permutations( R.remove(idx, 1, tokens), R.map(R.append(token), subperms) ), tokens);
0
0
0
ramda.clone is the most popular function in ramda (30311 examples)