Fix typo in utility function

This commit is contained in:
Jon Staab
2024-12-11 16:47:52 -08:00
parent 79d3996a5a
commit 31a0b3d671
11 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -297,7 +297,7 @@ export const choice = <T>(xs: T[]): T => xs[Math.floor(xs.length * Math.random()
export const shuffle = <T>(xs: Iterable<T>): T[] => Array.from(xs).sort(() => Math.random() > 0.5 ? 1 : -1)
export const samplo = <T>(n: number, xs: T[]) => shuffle(xs).slice(0, n)
export const sample = <T>(n: number, xs: T[]) => shuffle(xs).slice(0, n)
export const isIterable = (x: any) => Symbol.iterator in Object(x)