diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index c533f78916..c596be263a 100755 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -302,7 +302,7 @@ cell-bits 32 = [ ] unit-test [ t ] [ - [ 1000 [ 1+ ] map ] { 1+ fixnum+ } inlined? + [ 1000 iota [ 1+ ] map ] { 1+ fixnum+ } inlined? ] unit-test : rec ( a -- b ) diff --git a/extra/project-euler/018/018.factor b/extra/project-euler/018/018.factor index a4aded7096..9c7c4fee74 100644 --- a/extra/project-euler/018/018.factor +++ b/extra/project-euler/018/018.factor @@ -66,7 +66,7 @@ IN: project-euler.018 91 71 52 38 17 14 91 43 58 50 27 29 48 63 66 04 68 89 53 67 30 73 16 69 87 40 31 04 62 98 27 23 09 70 98 73 93 38 53 60 04 23 - } 15 [ 1+ cut swap ] map nip ; + } 15 iota [ 1+ cut swap ] map nip ; PRIVATE> diff --git a/extra/project-euler/032/032.factor b/extra/project-euler/032/032.factor index 5ff5234679..64c9ec445e 100755 --- a/extra/project-euler/032/032.factor +++ b/extra/project-euler/032/032.factor @@ -27,7 +27,9 @@ IN: project-euler.032 integer ] map ; + 9 factorial iota [ + 9 permutation [ 1+ ] map 10 digits>integer + ] map ; : 1and4 ( n -- ? ) number>string 1 cut-slice 4 cut-slice diff --git a/extra/project-euler/150/150.factor b/extra/project-euler/150/150.factor index e013e16575..314698534f 100644 --- a/extra/project-euler/150/150.factor +++ b/extra/project-euler/150/150.factor @@ -50,13 +50,13 @@ IN: project-euler.150 615949 * 797807 + 20 2^ rem dup 19 2^ - ; inline : sums-triangle ( -- seq ) - 0 1000 [ 1+ [ next ] replicate partial-sums ] map nip ; + 0 1000 iota [ 1+ [ next ] replicate partial-sums ] map nip ; :: (euler150) ( m -- n ) [let | table [ sums-triangle ] | m [| x | x 1+ [| y | - m x - [| z | + m x - iota [| z | x z + table nth-unsafe [ y z + 1+ swap nth-unsafe ] [ y swap nth-unsafe ] bi -