From dfe823f53acdcc7b96287a9625117165706ef299 Mon Sep 17 00:00:00 2001 From: rowan Date: Thu, 17 Apr 2025 18:05:02 -0500 Subject: [PATCH] repeat --- src/function.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/function.js b/src/function.js index a7a20f4..f4ef437 100644 --- a/src/function.js +++ b/src/function.js @@ -142,11 +142,11 @@ export const reduce = curry(dispatch(['fantasy-land/reduce', 'reduce'], (f, acc, xs) => xs.reduce(f, acc) )) -export const repeat = curry((n, f) => { +export const repeat = curry((n, x) => { const results = [] for (let i = n; i > 0; i--) { - results.push(f()) + results.push(x) } return results