UNPKG

ramda-extension

Version:

Helpful functions built on top of the mighty Ramda

26 lines (23 loc) 572 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ramda = require("ramda"); /** * Creates pairs from value and list of values. * Value is always appended as the last item to the pair. * * @func * @category List * @see xPairs * * @example * * R_.xPairsRight(1, [2, 3]) // [[2, 1], [3, 1]] * * @sig a -> [b] -> [[b, a]] */ var xPairsRight = (0, _ramda.useWith)((0, _ramda.flip)(_ramda.xprod), [(0, _ramda.of)(Array), _ramda.identity]); var _default = xPairsRight; exports.default = _default;