summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-07-01 13:18:06 -0700
committerElizabeth Hunt <me@liz.coffee>2025-07-01 13:18:06 -0700
commita84c2cf1b6502dc671409811199b1b5aa2b9d673 (patch)
treeb467a1612508a65c9e7f7d2457307770f6d3d5d6
parent3a3c2cec6e4044c00c4b095cf87eb80f4226e893 (diff)
downloadci-a84c2cf1b6502dc671409811199b1b5aa2b9d673.tar.gz
ci-a84c2cf1b6502dc671409811199b1b5aa2b9d673.zip
Fix prepend util
-rw-r--r--u/leftpadesque/prepend.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/u/leftpadesque/prepend.ts b/u/leftpadesque/prepend.ts
index d80f6b6..1819536 100644
--- a/u/leftpadesque/prepend.ts
+++ b/u/leftpadesque/prepend.ts
@@ -2,4 +2,4 @@ export const prependWith = (arr: string[], prep: string) =>
Array(arr.length * 2)
.fill(0)
.map((_, i) => i % 2 === 0)
- .map((isPrep, i) => (isPrep ? prep : arr[i]!));
+ .map((isPrep, i) => (isPrep ? prep : arr[Math.floor(i / 2)]!));