From 1eb7dbe6d2a86041edc738a7022e002434d2a96b Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 6 Jan 2020 13:26:19 -0800 Subject: [PATCH] io.files: quot effects in change-file-lines and change-file-contents. --- core/io/files/files.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/io/files/files.factor b/core/io/files/files.factor index 7ba3f9e82c..e96dbc8ab5 100644 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -56,14 +56,14 @@ HOOK: (file-appender) io-backend ( path -- stream ) : set-file-lines ( seq path encoding -- ) [ [ print ] each ] with-file-writer ; -: change-file-lines ( path encoding quot -- ) +: change-file-lines ( ..a path encoding quot: ( ..a seq -- ..b seq' ) -- ..b ) [ [ file-lines ] dip call ] [ drop set-file-lines ] 3bi ; inline : set-file-contents ( seq path encoding -- ) [ write ] with-file-writer ; -: change-file-contents ( path encoding quot -- ) +: change-file-contents ( ..a path encoding quot: ( ..a seq -- ..b seq' ) -- ..b ) [ [ file-contents ] dip call ] [ drop set-file-contents ] 3bi ; inline