From 239ce6d82267e73382087b8eacff5d2e8ad28715 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 22 Aug 2004 23:06:51 +0000 Subject: [PATCH] fix some usages of inject --- TODO.FACTOR.txt | 2 +- library/httpd/html.factor | 2 +- library/httpd/http-common.factor | 4 ++-- library/image.factor | 2 +- library/init.factor | 2 +- library/inspector.factor | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 5be16deafd..186db514e6 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -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 diff --git a/library/httpd/html.factor b/library/httpd/html.factor index 3816f1cb10..f7d4037a1d 100644 --- a/library/httpd/html.factor +++ b/library/httpd/html.factor @@ -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 % "; " % ; diff --git a/library/httpd/http-common.factor b/library/httpd/http-common.factor index 8fa8bd7836..7fd590ea5f 100644 --- a/library/httpd/http-common.factor +++ b/library/httpd/http-common.factor @@ -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 [ diff --git a/library/image.factor b/library/image.factor index 5cffaec468..201609aed4 100644 --- a/library/image.factor +++ b/library/image.factor @@ -295,7 +295,7 @@ IN: cross-compiler ( Arrays and vectors ) : 'array ( list -- untagged ) - [ ' ] inject + [ ' ] map here >r array-type >header emit dup length emit diff --git a/library/init.factor b/library/init.factor index 19d81bcfdb..3c37c7b811 100644 --- a/library/init.factor +++ b/library/init.factor @@ -78,7 +78,7 @@ USE: words ] when ; : parse-switches ( args -- args ) - [ cli-arg ] inject ; + [ cli-arg ] map ; : run-files ( args -- ) [ [ run-file ] when* ] each ; diff --git a/library/inspector.factor b/library/inspector.factor index d42d29669a..11678258de 100644 --- a/library/inspector.factor +++ b/library/inspector.factor @@ -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