aboutsummaryrefslogtreecommitdiff
path: root/docs/bqn.js
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-03-11 11:51:54 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-03-11 11:51:54 -0500
commite16f8ab821b07bb7fc90b8ffdd6ba0c42cfc7d1c (patch)
tree47a40e44f34f3fbd08acb346cd90808d9439a74f /docs/bqn.js
parentc66d51a9515a887e1ea8a35e6ebd16109ceaf7dd (diff)
Fix missing fill in •rand.Deal and •rand.Subset
Diffstat (limited to 'docs/bqn.js')
-rw-r--r--docs/bqn.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/bqn.js b/docs/bqn.js
index a2aa7f58..1166ed56 100644
--- a/docs/bqn.js
+++ b/docs/bqn.js
@@ -670,12 +670,12 @@ let rand = (() => {
let j = i + randnat(x-i);
let t=r[i]; r[i]=r[j]; r[j]=t;
}
- r.length = w; return list(r);
+ r.length = w; return list(r,0);
};
let deal = deal_err("Deal");
let subset = (x,w) => {
reqnat("Subset: 𝕩", x);
- if (!has(w)) return list(iota(x).filter(_=>Math.random()<0.5));
+ if (!has(w)) return list(iota(x).filter(_=>Math.random()<0.5), 0);
return deal_err("Subset")(x,w).sort();
};
return makens(["range", "deal", "subset"], [range, deal, subset]);