fix stack effects/documentation part 2

erg 2006-12-12 20:29:32 +00:00
parent a993b7be67
commit 00f3d99dd9
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ M: quotation like drop dup quotation? [ >quotation ] unless ;
: unit ( obj -- quot ) 1array >quotation ;
GENERIC: literalize ( obj -- newobj )
GENERIC: literalize ( obj -- wrapped )
M: object literalize ;
M: word literalize <wrapper> ;
M: wrapper literalize <wrapper> ;

View File

@ -38,7 +38,7 @@ HELP: <wrapper> ( obj -- wrapper )
{ $values { "obj" "an object" } { "wrapper" "a new wrapper" } }
{ $description "Creates an object which pushes " { $snippet "obj" } " on the stack when evaluated. User code should call " { $link literalize } " instead, since it avoids wrapping self-evaluating objects (which is redundant)." } ;
HELP: literalize ( obj -- wrapped )
HELP: literalize
{ $values { "obj" "an object" } { "wrapped" "an object" } }
{ $description "Outputs an object which evaluates to " { $snippet "obj" } " when placed in a quotation. If " { $snippet "obj" } " is not self-evaluating (for example, it is a word), then it will be wrapped." }
{ $examples

View File

@ -47,7 +47,7 @@ M: gadget equal? eq? ;
: gadget-child ( gadget -- child ) gadget-children first ;
: nth-gadget ( n gadget -- ) gadget-children nth ;
: nth-gadget ( n gadget -- child ) gadget-children nth ;
: <zero-rect> ( -- rect ) { 0 0 } dup <rect> ;