From 70299ba86a26d7721d47ff4852cc0732f77d7589 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 5 Dec 2007 09:49:39 -0600 Subject: [PATCH] Fix bug curry -> swap curry --- extra/random-tester/utils/utils.factor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extra/random-tester/utils/utils.factor b/extra/random-tester/utils/utils.factor index 91aefabe6f..1c591a11e9 100644 --- a/extra/random-tester/utils/utils.factor +++ b/extra/random-tester/utils/utils.factor @@ -93,9 +93,9 @@ C: p-list >r make-p-list r> (each-permutation) ; -MEMO: builder-permutations ( n -- seq ) - { compose curry } swap permutations - [ >quotation ] map ; foldable +: builder-permutations ( n -- seq ) + { [ compose ] [ swap curry ] } swap permutations + [ concat ] map ; foldable : all-quot-permutations ( seq -- newseq ) dup length 1- builder-permutations @@ -103,3 +103,4 @@ MEMO: builder-permutations ( n -- seq ) [ swap [ >r seq>stack r> call ] curry* map ] curry* map ; ! clear { map sq 10 } all-quot-permutations [ [ [ [ [ call ] keep datastack length 2 = [ . .s nl ] when ] catch ] in-thread drop ] each ] each +! clear { map sq sq 10 } all-quot-permutations [ [ [ [ [ call ] keep datastack length 2 = [ . .s nl ] when ] catch ] in-thread drop ] each ] each