fix stack effect of n*quot, use iota in core/slots

db4
Doug Coleman 2009-04-17 18:04:41 -05:00
parent b579d32e5c
commit 7eaa20a4c5
3 changed files with 5 additions and 5 deletions

View File

@ -272,8 +272,8 @@ HELP: nweave
HELP: n*quot
{ $values
{ "n" integer } { "seq" sequence }
{ "seq'" sequence }
{ "n" integer } { "quot" quotation }
{ "quot'" quotation }
}
{ $examples
{ $example "USING: generalizations prettyprint math ;"

View File

@ -7,7 +7,7 @@ IN: generalizations
<<
: n*quot ( n seq -- seq' ) <repetition> concat >quotation ;
: n*quot ( n quot -- seq' ) <repetition> concat >quotation ;
: repeat ( n obj quot -- ) swapd times ; inline
@ -94,4 +94,4 @@ MACRO: nweave ( n -- )
: nappend-as ( n exemplar -- seq )
[ narray concat ] dip like ; inline
: nappend ( n -- seq ) narray concat ; inline
: nappend ( n -- seq ) narray concat ; inline

View File

@ -222,7 +222,7 @@ M: slot-spec make-slot
[ make-slot ] map ;
: finalize-slots ( specs base -- specs )
over length [ + ] with map [ >>offset ] 2map ;
over length iota [ + ] with map [ >>offset ] 2map ;
: slot-named ( name specs -- spec/f )
[ name>> = ] with find nip ;