swap ... 3append -> surround in core

db4
Doug Coleman 2008-12-06 18:42:41 -06:00
parent 294b84b659
commit 37b9a350cc
4 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ PREDICATE: intersection-class < class
[ drop t ] [ drop t ]
] [ ] [
unclip "predicate" word-prop swap [ unclip "predicate" word-prop swap [
"predicate" word-prop [ dup ] swap [ not ] 3append "predicate" word-prop [ dup ] [ not ] surround
[ drop f ] [ drop f ]
] { } map>assoc alist>quot ] { } map>assoc alist>quot
] if-empty ; ] if-empty ;

View File

@ -71,7 +71,7 @@ TUPLE: no-current-vocab ;
: word-restarts ( name possibilities -- restarts ) : word-restarts ( name possibilities -- restarts )
natural-sort natural-sort
[ [ "Use the " swap vocabulary>> " vocabulary" 3append ] keep ] { } map>assoc [ [ vocabulary>> "Use the " " vocabulary" surround ] keep ] { } map>assoc
swap "Defer word in current vocabulary" swap 2array swap "Defer word in current vocabulary" swap 2array
suffix ; suffix ;
@ -89,7 +89,7 @@ SYMBOL: auto-use?
dup vocabulary>> dup vocabulary>>
[ (use+) ] [ (use+) ]
[ amended-use get dup [ push ] [ 2drop ] if ] [ amended-use get dup [ push ] [ 2drop ] if ]
[ "Added ``" swap "'' vocabulary to search path" 3append note. ] [ "Added ``" "'' vocabulary to search path" surround note. ]
tri tri
] [ create-in ] if ; ] [ create-in ] if ;
@ -292,7 +292,7 @@ print-use-hook global [ [ ] or ] change-at
] with-compilation-unit ; ] with-compilation-unit ;
: parse-file-restarts ( file -- restarts ) : parse-file-restarts ( file -- restarts )
"Load " swap " again" 3append t 2array 1array ; "Load " " again" surround t 2array 1array ;
: parse-file ( file -- quot ) : parse-file ( file -- quot )
[ [

View File

@ -50,7 +50,7 @@ PREDICATE: writer < word "writer" word-prop ;
define-typecheck ; define-typecheck ;
: writer-word ( name -- word ) : writer-word ( name -- word )
"(>>" swap ")" 3append (( value object -- )) create-accessor "(>>" ")" surround (( value object -- )) create-accessor
dup t "writer" set-word-prop ; dup t "writer" set-word-prop ;
ERROR: bad-slot-value value class ; ERROR: bad-slot-value value class ;

View File

@ -239,7 +239,7 @@ ERROR: bad-create name vocab ;
dup [ 2nip ] [ drop <word> dup reveal ] if ; dup [ 2nip ] [ drop <word> dup reveal ] if ;
: constructor-word ( name vocab -- word ) : constructor-word ( name vocab -- word )
[ "<" swap ">" 3append ] dip create ; [ "<" ">" surround ] dip create ;
PREDICATE: parsing-word < word "parsing" word-prop ; PREDICATE: parsing-word < word "parsing" word-prop ;