init claude-code

This commit is contained in:
2026-04-01 17:32:37 +02:00
commit 73b208c009
1902 changed files with 513237 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
export function intersperse<A>(as: A[], separator: (index: number) => A): A[] {
return as.flatMap((a, i) => (i ? [separator(i), a] : [a]))
}
export function count<T>(arr: readonly T[], pred: (x: T) => unknown): number {
let n = 0
for (const x of arr) n += +!!pred(x)
return n
}
export function uniq<T>(xs: Iterable<T>): T[] {
return [...new Set(xs)]
}