From 1486cd9e970feef5edb08fdee58046cb64397e9a Mon Sep 17 00:00:00 2001 From: crc Date: Wed, 27 Oct 2021 13:15:08 +0000 Subject: [PATCH] update a:for-each FossilOrigin-Name: 8d0fd38330d3a2892cccf2cf6f288dacc8d4e49cc77ac8efc175554550f1d73a --- array-todo.txt | 2 +- image/retro.forth | 2 +- ngaImage | Bin 43596 -> 43596 bytes vm/nga-c/image.c | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/array-todo.txt b/array-todo.txt index 3ff4bf0..a54538d 100644 --- a/array-todo.txt +++ b/array-todo.txt @@ -17,7 +17,7 @@ Words marked with a (-) are partially updated. [x] a:length [-] a:counted-results [ ] a:from-string -[ ] a:for-each +[x] a:for-each [ ] a:dup [ ] a:copy [ ] a:to-string diff --git a/image/retro.forth b/image/retro.forth index 3980e60..3a8db90 100644 --- a/image/retro.forth +++ b/image/retro.forth @@ -1526,7 +1526,7 @@ additional combinators. ~~~ :a:for-each (aq-) swap fetch-next &swap dip - [ push fetch-next \swpodupu \swpuca.. \popo.... ] times drop-pair ; + [ push a:(fetch-next) \swpodupu \swpuca.. \popo.... ] times drop-pair ; ~~~ With this I can easily define `a:dup` to make a copy of an diff --git a/ngaImage b/ngaImage index 97b4b3fffbc0c8c5508d478854ec52942fd4af1e..dd5a67a356fb13182e23c4c156447719111d20ee 100644 GIT binary patch delta 17 ZcmX?eh3U){rVT5)nZ7D+Ue&!w4ggfO2