fix some usages of inject

cvs
Slava Pestov 2004-08-22 23:06:51 +00:00
parent 4fc457b27f
commit 239ce6d822
6 changed files with 8 additions and 8 deletions

View File

@ -6,6 +6,7 @@
- multiple tasks should be able to write to the same port
- prettyprinting an empty vector
- jvm factor -- still supporting httpd?
- make inferior.factor nicer to use
+ docs:
@ -27,7 +28,6 @@
- balance needs USE:
- fedit broken with listener
- maple-like: press enter at old commands to evaluate there
- make inferior.factor nicer to use
- input style after clicking link
- plugin not unloaded
- listener backspace overzealous

View File

@ -72,7 +72,7 @@ USE: url-encoding
url-encode "a" swap link-attrs html-tag ;
: >hex-color ( triplet -- hex )
[ >hex 2 digits ] inject "#" swons cat ;
[ >hex 2 digits ] map "#" swons cat ;
: fg-css% ( color -- )
"color: " % >hex-color % "; " % ;

View File

@ -69,10 +69,10 @@ USE: url-encoding
"Content-Length" swap assoc dec> ;
: post-request>alist ( post-request -- alist )
"&" split [ "=" split1 cons ] inject ;
"&" split [ "=" split1 cons ] map ;
: url-decode-alist ( alist -- alist )
[ uncons >r url-decode r> url-decode cons ] inject ;
[ uncons >r url-decode r> url-decode cons ] map ;
: read-post-request ( header -- alist )
content-length dup [

View File

@ -295,7 +295,7 @@ IN: cross-compiler
( Arrays and vectors )
: 'array ( list -- untagged )
[ ' ] inject
[ ' ] map
here >r
array-type >header emit
dup length emit

View File

@ -78,7 +78,7 @@ USE: words
] when ;
: parse-switches ( args -- args )
[ cli-arg ] inject ;
[ cli-arg ] map ;
: run-files ( args -- )
[ [ run-file ] when* ] each ;

View File

@ -65,10 +65,10 @@ USE: vectors
: alist-keys>str ( alist -- alist )
#! Unparse non-string keys.
[ unswons ?unparse swons ] inject ;
[ unswons ?unparse swons ] map ;
: name-padding ( alist -- col )
[ car ] inject max-str-length ;
[ car ] map max-str-length ;
: (describe-assoc) ( alist -- )
dup name-padding swap