getting rid of seq-stupid-all
parent
55ce64a477
commit
c4f0756b66
|
@ -181,9 +181,6 @@ UNION: comp-literal number general-list ;
|
||||||
M: comp-literal compile-ast ! literal numbers
|
M: comp-literal compile-ast ! literal numbers
|
||||||
replace-with nip ;
|
replace-with nip ;
|
||||||
|
|
||||||
: seq-stupid-all? ( seq pred -- ? )
|
|
||||||
t -rot [ call and ] cons each ; inline
|
|
||||||
|
|
||||||
: accumulator ( vars { asts } quot -- quot )
|
: accumulator ( vars { asts } quot -- quot )
|
||||||
-rot [
|
-rot [
|
||||||
[
|
[
|
||||||
|
@ -194,7 +191,7 @@ M: comp-literal compile-ast ! literal numbers
|
||||||
] make-list nip ;
|
] make-list nip ;
|
||||||
|
|
||||||
M: vector compile-ast ! literal vectors
|
M: vector compile-ast ! literal vectors
|
||||||
dup [ number? ] seq-stupid-all? [
|
dup [ number? ] all? [
|
||||||
replace-with nip
|
replace-with nip
|
||||||
] [
|
] [
|
||||||
[ , ] accumulator [ make-vector nip ] cons
|
[ , ] accumulator [ make-vector nip ] cons
|
||||||
|
|
Loading…
Reference in New Issue