UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

11 lines (10 loc) 294 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.repeat = void 0; function repeat(value, repetitions) { if (arguments.length === 1) { return (r) => repeat(value, r); } return new Array(repetitions).fill(value); } exports.repeat = repeat;