From b14a5f4ab8eb98fecbcd978f0715980edd112c7a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 8 Aug 2020 13:55:05 -0400 Subject: Don't copy initial cell in scan with empty argument --- bqn.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bqn.js b/bqn.js index 6ca5d642..800080bc 100644 --- a/bqn.js +++ b/bqn.js @@ -86,10 +86,13 @@ let table = m1(f => (x,w) => !has(w) : arr([].concat.apply([],w.map(d=>x.map(e=>call(f,e,d)))),w.sh.concat(x.sh))); let scan = m1(f => (x,w) => { let s=x.sh;assert(!has(w)&&x.a&&s.length>0); - let c=1;for(let i=1;i0) { + let c=1;for(let i=1;i