aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-08 21:15:23 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-08 21:15:23 -0500
commiteacc17c4ae6d8198a20f2a180315ea5adf658559 (patch)
tree2fcd3bf133b26a41d5405b6400f80c09ec32d64d /docs
parent549433964358658d05c7e6fb546dbb0f3b3c151d (diff)
Use .flat() instead of concat to allow Table with long 𝕨
Diffstat (limited to 'docs')
-rw-r--r--docs/bqn.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/bqn.js b/docs/bqn.js
index 0fdd6ab0..fafb4ac1 100644
--- a/docs/bqn.js
+++ b/docs/bqn.js
@@ -266,7 +266,7 @@ let equals = (x,w) => {
}
let table = m1(f => (x,w) => !has(w)
? arr(x.map(e=>call(f,e)),x.sh)
- : arr([].concat.apply([],w.map(d=>x.map(e=>call(f,e,d)))),w.sh.concat(x.sh)));
+ : arr(w.map(d=>x.map(e=>call(f,e,d))).flat(),w.sh.concat(x.sh)));
let scan = m1(f => (x,w) => {
let s=x.sh;
if (!s||s.length===0) throw Error("`: 𝕩 must have rank at least 1");
@@ -556,7 +556,7 @@ let addprimitives = (state, p) => {
pr[k].push(gl); rt[k].push(val);
});
state.glyphs = pr.map(str);
- state.runtime = list([].concat(...rt));
+ state.runtime = list(rt.flat());
compgen(state);
}
let rerepl = (repl, cmp, state) => {
@@ -576,7 +576,7 @@ let rerepl = (repl, cmp, state) => {
}
}
let primitives = dynsys(state => {
- let gl=[].concat(...state.glyphs), rt=state.runtime;
+ let gl=state.glyphs.flat(), rt=state.runtime;
return list(gl.map((g,i) => list([g,rt[i]])));
});