How to use the unapply function from ramda

Find comprehensive JavaScript ramda.unapply code examples handpicked from public code repositorys.

21
22
23
24
25
26
27
28
29
30
var always = _require2.always;
var merge = _require2.merge;
var props = _require2.props;
var apply = _require2.apply;
var identity = _require2.identity;
var unapply = _require2.unapply;
var zipObj = _require2.zipObj;

var setPos = curry(function (elem, left, top) {
  elem.style.left = left + 'px';
fork icon1
star icon3
watch icon3

14
15
16
17
18
19
20
21
22
23
24
  R.fromPairs,
  R.map(([k, _]) => [k, R.lensProp(k)]),
  R.toPairs
)(defaults)


const mergeString = R.unapply(R.compose(
  R.defaultTo(''),
  R.head(),
  R.reject(isUseless),
  R.reverse,
fork icon0
star icon4
watch icon0

+ 5 other calls in file

4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
 * @param {Function} fn
 * @return {Function}
 * @see R.apply
 * @example
 *
 *      R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]'
 */
var unapply = _curry1(function unapply(fn) {
    return function () {
        return fn(_slice(arguments));
fork icon0
star icon0
watch icon0

+ 17 other calls in file

35
36
37
38
39
40
41
42
43
44
45
46


const possibleSeqs = R.map(
    R.compose(R.sum, R.unnest),
    R.xprod(R.xprod([1, 2, 3], [1, 2, 3]), [1, 2, 3]));
const quantumGame = R.memoizeWith(
    R.unapply(R.toString),
    ([p1, p2], [p1Score, p2Score]) => {
      p1 %= 10; p2 %= 10;


      // Only need to check on p2, since he's always going to be the last
fork icon0
star icon0
watch icon0

+ 6 other calls in file

14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
 * @return {Function}
 * @see R.apply
 * @example
 *
 *      R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]'
 * @symb R.unapply(f)(a, b) = f([a, b])
 */




var unapply =
fork icon0
star icon0
watch icon2

+ 7 other calls in file

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)