]> gitweb.factorcode.org Git - factor.git/commitdiff
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 1 Jun 2017 21:59:35 +0000 (16:59 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 2 Jun 2017 16:57:05 +0000 (11:57 -0500)
272 files changed:
basis/alien/endian/endian.factor
basis/binary-search/binary-search-tests.factor
basis/bit-sets/bit-sets.factor
basis/bitstreams/bitstreams.factor
basis/checksums/crc16/crc16.factor
basis/checksums/md5/md5.factor
basis/checksums/sha/sha-tests.factor
basis/cocoa/enumeration/enumeration.factor
basis/cocoa/messages/messages.factor
basis/combinators/random/random.factor
basis/compiler/cfg/builder/alien/alien.factor
basis/compiler/cfg/dominance/dominance-tests.factor
basis/compiler/cfg/intrinsics/allot/allot.factor
basis/compiler/cfg/intrinsics/simd/simd.factor
basis/compiler/cfg/linearization/linearization-tests.factor
basis/compiler/cfg/liveness/liveness-tests.factor
basis/compiler/cfg/rpo/rpo.factor
basis/compiler/cfg/ssa/destruction/coalescing/coalescing-tests.factor
basis/compiler/cfg/stacks/local/local.factor
basis/compiler/cfg/stacks/padding/padding.factor
basis/compiler/cfg/stacks/stacks.factor
basis/compiler/cfg/value-numbering/expressions/expressions.factor
basis/compiler/cfg/value-numbering/simd/simd.factor
basis/compiler/tests/codegen.factor
basis/compiler/tests/curry.factor
basis/compiler/tests/intrinsics.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tests/redefine23.factor
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/dead-code/branches/branches.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor
basis/compiler/tree/propagation/transforms/transforms.factor
basis/compression/huffman/huffman.factor
basis/compression/inflate/inflate.factor
basis/compression/lzw/lzw.factor
basis/concurrency/combinators/combinators-tests.factor
basis/db/queries/queries.factor
basis/db/tester/tester.factor
basis/fry/fry-tests.factor
basis/game/input/dinput/dinput.factor
basis/game/input/gtk/gtk.factor
basis/game/input/x11/x11.factor
basis/generalizations/generalizations.factor
basis/grouping/grouping-docs.factor
basis/heaps/heaps-tests.factor
basis/hints/hints.factor
basis/images/images.factor
basis/images/processing/processing.factor
basis/io/encodings/iso2022/iso2022.factor
basis/io/files/unique/unique.factor
basis/io/ports/ports-tests.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/io/styles/styles-docs.factor
basis/lcs/lcs.factor
basis/macros/expander/expander.factor
basis/math/bitwise/bitwise.factor
basis/math/combinatorics/combinatorics-docs.factor
basis/math/combinatorics/combinatorics-tests.factor
basis/math/combinatorics/combinatorics.factor
basis/math/functions/functions.factor
basis/math/intervals/intervals-tests.factor
basis/math/matrices/elimination/elimination.factor
basis/math/matrices/matrices.factor
basis/math/polynomials/polynomials.factor
basis/math/primes/miller-rabin/miller-rabin-tests.factor
basis/math/primes/miller-rabin/miller-rabin.factor
basis/math/statistics/statistics-tests.factor
basis/math/vectors/simd/simd-tests.factor
basis/nibble-arrays/nibble-arrays-tests.factor
basis/persistent/vectors/vectors-tests.factor
basis/porter-stemmer/porter-stemmer.factor
basis/prettyprint/prettyprint-tests.factor
basis/prettyprint/sections/sections.factor
basis/random/random-tests.factor
basis/random/random.factor
basis/random/sfmt/sfmt.factor
basis/regexp/disambiguate/disambiguate.factor
basis/sequences/generalizations/generalizations.factor
basis/sequences/unrolled/unrolled.factor
basis/specialized-arrays/specialized-arrays-docs.factor
basis/stack-checker/stack-checker-tests.factor
basis/suffix-arrays/suffix-arrays.factor
basis/threads/threads-docs.factor
basis/threads/threads-tests.factor
basis/tools/deploy/windows/ico/ico.factor
basis/tools/hexdump/hexdump-tests.factor
basis/tools/profiler/sampling/sampling-tests.factor
basis/tools/scaffold/scaffold-tests.factor
basis/tr/tr.factor
basis/tuple-arrays/tuple-arrays.factor
basis/ui/gadgets/gadgets-tests.factor
basis/ui/gadgets/scrollers/scrollers-tests.factor
basis/ui/pens/gradient/gradient.factor
basis/unicode/breaks/breaks-tests.factor
basis/unicode/breaks/breaks.factor
basis/unicode/collation/collation.factor
basis/unicode/unicode.factor
basis/windows/registry/registry.factor
core/assocs/assocs-tests.factor
core/assocs/assocs.factor
core/checksums/crc32/crc32.factor
core/classes/tuple/tuple.factor
core/combinators/combinators.factor
core/continuations/continuations-tests.factor
core/hash-sets/hash-sets-tests.factor
core/hashtables/hashtables-tests.factor
core/io/binary/binary.factor
core/io/encodings/utf16/utf16.factor
core/io/encodings/utf8/utf8-tests.factor
core/kernel/kernel-docs.factor
core/kernel/kernel-tests.factor
core/math/floats/floats-tests.factor
core/memory/memory-tests.factor
core/sbufs/sbufs-tests.factor
core/sequences/sequences-docs.factor
core/sequences/sequences-tests.factor
core/sequences/sequences.factor
core/slots/slots.factor
core/sorting/sorting-tests.factor
core/vectors/vectors-tests.factor
extra/alien/data/map/map-tests.factor
extra/arrays/shaped/shaped.factor
extra/audio/vorbis/vorbis.factor
extra/benchmark/base64/base64.factor
extra/benchmark/beust2/beust2.factor
extra/benchmark/bloom-filters/bloom-filters.factor
extra/benchmark/chameneos-redux/chameneos-redux.factor
extra/benchmark/combinatorics/combinatorics.factor
extra/benchmark/csv/csv.factor
extra/benchmark/dawes/dawes.factor
extra/benchmark/dispatch2/dispatch2.factor
extra/benchmark/dlists/dlists.factor
extra/benchmark/e-decimals/e-decimals.factor
extra/benchmark/e-ratios/e-ratios.factor
extra/benchmark/empty-loop-2/empty-loop-2.factor
extra/benchmark/fannkuch/fannkuch.factor
extra/benchmark/fasta/fasta.factor
extra/benchmark/gc1/gc1.factor
extra/benchmark/gc3/gc3.factor
extra/benchmark/hash-sets/hash-sets.factor
extra/benchmark/iteration/iteration.factor
extra/benchmark/json/json.factor
extra/benchmark/linked-assocs/linked-assocs.factor
extra/benchmark/make/make.factor
extra/benchmark/mandel/colors/colors.factor
extra/benchmark/mandel/mandel.factor
extra/benchmark/matrix-exponential-scalar/matrix-exponential-scalar.factor
extra/benchmark/matrix-exponential-simd/matrix-exponential-simd.factor
extra/benchmark/md5/md5.factor
extra/benchmark/memoize/memoize.factor
extra/benchmark/msgpack/msgpack.factor
extra/benchmark/parse-bignum/parse-bignum.factor
extra/benchmark/parse-fixnum/parse-fixnum.factor
extra/benchmark/partial-sums/partial-sums.factor
extra/benchmark/randomize/randomize.factor
extra/benchmark/raytracer-simd/raytracer-simd.factor
extra/benchmark/raytracer/raytracer.factor
extra/benchmark/regexp/regexp.factor
extra/benchmark/ring/ring.factor
extra/benchmark/sha1/sha1.factor
extra/benchmark/simd-1/simd-1.factor
extra/benchmark/sort/sort.factor
extra/benchmark/spectral-norm-simd/spectral-norm-simd.factor
extra/benchmark/spectral-norm/spectral-norm.factor
extra/benchmark/splay/splay.factor
extra/benchmark/splitting/splitting.factor
extra/benchmark/sum-file/sum-file.factor
extra/benchmark/tcp-echo0/tcp-echo0.factor
extra/benchmark/tuple-arrays/tuple-arrays.factor
extra/benchmark/udp-echo0/udp-echo0.factor
extra/benchmark/ui-panes/ui-panes.factor
extra/benchmark/wrap/wrap.factor
extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor
extra/bloom-filters/bloom-filters-tests.factor
extra/bson/writer/writer.factor
extra/chipmunk/demo/demo.factor
extra/classes/struct/vectored/vectored.factor
extra/compiler/cfg/gvn/expressions/expressions.factor
extra/compiler/cfg/gvn/simd/simd.factor
extra/crypto/passwd-md5/passwd-md5.factor
extra/crypto/xor/xor.factor
extra/cuda/devices/devices.factor
extra/enigma/enigma-tests.factor
extra/enigma/enigma.factor
extra/game/debug/debug.factor
extra/game/input/demos/joysticks/joysticks.factor
extra/gpu/render/render.factor
extra/gpu/shaders/shaders.factor
extra/graphviz/graphviz-docs.factor
extra/graphviz/graphviz-tests.factor
extra/grid-meshes/grid-meshes.factor
extra/grouping/extras/extras-tests.factor
extra/html/parser/analyzer/analyzer.factor
extra/id3/id3-tests.factor
extra/images/atlas/atlas.factor
extra/images/pbm/pbm.factor
extra/images/png/png.factor
extra/images/tga/tga.factor
extra/io/streams/peek/peek-tests.factor
extra/jamshred/gl/gl.factor
extra/koszul/koszul.factor
extra/lcd/lcd.factor
extra/lint/lint.factor
extra/macho/macho.factor
extra/mason/common/common.factor
extra/math/extras/extras-tests.factor
extra/math/extras/extras.factor
extra/math/factorials/factorials-tests.factor
extra/math/finance/finance-tests.factor
extra/math/matrices/laplace/laplace.factor
extra/math/primes/solovay-strassen/solovay-strassen-tests.factor
extra/math/primes/solovay-strassen/solovay-strassen.factor
extra/math/splines/splines.factor
extra/math/splines/viewer/viewer.factor
extra/math/transforms/fft/fft.factor
extra/multi-methods/multi-methods.factor
extra/noise/noise.factor
extra/nurbs/nurbs.factor
extra/odbc/odbc.factor
extra/pcre/pcre.factor
extra/picomath/picomath.factor
extra/project-euler/001/001.factor
extra/project-euler/011/011.factor
extra/project-euler/024/024.factor
extra/project-euler/027/027.factor
extra/project-euler/030/030.factor
extra/project-euler/032/032.factor
extra/project-euler/043/043.factor
extra/project-euler/052/052.factor
extra/project-euler/053/053.factor
extra/project-euler/055/055.factor
extra/project-euler/057/057.factor
extra/project-euler/081/081.factor
extra/project-euler/150/150.factor
extra/project-euler/151/151.factor
extra/project-euler/164/164.factor
extra/project-euler/265/265.factor
extra/project-euler/common/common.factor
extra/python/python-docs.factor
extra/python/python.factor
extra/random/cmwc/cmwc-tests.factor
extra/rosetta-code/bitmap-bezier/bitmap-bezier.factor
extra/rosetta-code/knapsack-unbounded/knapsack-unbounded.factor
extra/rosetta-code/knapsack/knapsack.factor
extra/rosetta-code/long-multiplication/long-multiplication.factor
extra/rosetta-code/luhn-test/luhn-test.factor
extra/rosetta-code/n-queens/n-queens.factor
extra/rosetta-code/one-d-cellular/one-d-cellular.factor
extra/sequences/extras/extras-tests.factor
extra/sequences/extras/extras.factor
extra/sequences/rotated/rotated.factor
extra/sequences/shifted/shifted-tests.factor
extra/sequences/snipped/snipped-tests.factor
extra/sets/extras/extras-tests.factor
extra/snake-game/game/game.factor
extra/snake-game/sprites/sprites.factor
extra/sorting/extras/extras-tests.factor
extra/space-invaders/space-invaders.factor
extra/spelling/spelling.factor
extra/sudoku/sudoku.factor
extra/synth/synth.factor
extra/talks/tc-lisp-talk/tc-lisp-talk.factor
extra/tetris/board/board.factor
extra/tetris/gl/gl.factor
extra/trees/avl/avl-tests.factor
extra/trees/splay/splay-tests.factor
extra/ui/gadgets/charts/demos/demos.factor
extra/ui/gadgets/charts/lines/lines-tests.factor
extra/zeromq/examples/hwclient.factor
extra/zeromq/examples/tasksink.factor
unmaintained/images/jpeg/jpeg.factor
unmaintained/sudokus/sudokus.factor

index a7593c05b770a5367ee34831dd151d03a392d159..2c32f2fdcd5bc592a7c0f48c8856cab41cab632c 100644 (file)
@@ -22,7 +22,7 @@ MACRO: byte-reverse ( n signed? -- quot )
     [
         drop
         [
-            dup iota [
+            dup <iota> [
                 [ 1 + - -8 * ] [ nip 8 * ] 2bi
                 '[ _ shift 0xff bitand _ shift ]
             ] with map
index b36c5f03822f0ffc0a009f2312c74874c755f9d2..98517a0d60d5405bef25cb2656dc4e9f380a62c3 100644 (file)
@@ -6,7 +6,7 @@ USING: binary-search kernel math.order sequences tools.test ;
 { 3 } [ 4 { 1 2 3 4 5 6 } [ <=> ] with search drop ] unit-test
 { 2 } [ 3.5 { 1 2 3 4 5 6 7 8 } [ <=> ] with search drop ] unit-test
 { 4 } [ 5.5 { 1 2 3 4 5 6 7 8 } [ <=> ] with search drop ] unit-test
-{ 10 } [ 10 20 iota [ <=> ] with search drop ] unit-test
+{ 10 } [ 10 20 <iota> [ <=> ] with search drop ] unit-test
 
 { 0 } [ "alligator" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
 { 3 } [ "hey" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
index 0f1bca79997dcebc81cc3fe9bf95244600a21139..5b31296d92db166cde95300d0bdfbfe41dfa5090 100644 (file)
@@ -60,7 +60,7 @@ M: bit-set subset?
     [ intersect ] keep = ;
 
 M: bit-set members
-    table>> [ length iota ] keep '[ _ nth-unsafe ] filter ;
+    table>> [ length <iota> ] keep '[ _ nth-unsafe ] filter ;
 
 <PRIVATE
 
index f7cb3708610ef9697f9e46229e64bcee53049df1..ee6ad00e83ebd2cb255ef181d401a5a27474df00 100644 (file)
@@ -181,7 +181,7 @@ M: msb0-bit-reader peek ( n bs -- bits )
     writer bytes>> ;
 
 :: byte-array-n>sequence ( byte-array n -- seq )
-    byte-array length 8 * n / iota
+    byte-array length 8 * n / <iota>
     byte-array <msb0-bit-reader> '[
         drop n _ read
     ] { } map-as ;
index d70f49849feaaf75025a0ab88f06e24a7fab0518..415a4090a4a3b00ee4fec99639ea36e31faf3832 100644 (file)
@@ -8,7 +8,7 @@ CONSTANT: crc16-polynomial 0xa001
 
 CONSTANT: crc16-table V{ }
 
-256 iota [
+256 <iota> [
     8 [
         [ 2/ ] [ even? ] bi [ crc16-polynomial bitxor ] unless
     ] times
index 80c136b2077afcbaff123d656fb21701007a52a2..391344bc875956fbfb59edf9d5792135b74775da 100644 (file)
@@ -30,7 +30,7 @@ M: md5 initialize-checksum-state drop <md5-state> ;
     [ old-state<< ] [ state<< ] bi ; inline
 
 CONSTANT: T $[
-    80 iota [ sin abs 32 2^ * >integer ] uint-array{ } map-as
+    80 <iota> [ sin abs 32 2^ * >integer ] uint-array{ } map-as
 ]
 
 :: F ( X Y Z -- FXYZ )
index 82ab54482ec6574f5aab5f2df414e4d2210c1069..9aa5b89b0c90004ae8a7848a2ce901f8e4fd3e96 100644 (file)
@@ -92,9 +92,9 @@ ERROR: checksums-differ algorithm seq incremental-checksum one-go-checksum ;
         checksums-differ
     ] if ;
 
-{ t } [ 100 iota [ drop sha1 100 [ 100 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
-{ t } [ 100 iota [ drop sha1 20 [ 20 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
-{ t } [ 100 iota [ drop sha1 10 [ 10 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
+{ t } [ 100 <iota> [ drop sha1 100 [ 100 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
+{ t } [ 100 <iota> [ drop sha1 20 [ 20 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
+{ t } [ 100 <iota> [ drop sha1 10 [ 10 random random-bytes ] replicate compare-checksum-calculations ] all? ] unit-test
 
 { t } [ sha1 {
     B{ 105 27 166 214 73 114 110 }
index a78a29bd7ff1f079c0bac0f40a95249024aedbe6..4f5a69697a97d00e69c6d3c418db42ee4f71e77b 100644 (file)
@@ -20,7 +20,7 @@ CONSTANT: NS-EACH-BUFFER-SIZE 16
     object state stackbuf count -> countByEnumeratingWithState:objects:count: :> items-count
     items-count 0 = [
         state itemsPtr>> [ items-count id <c-direct-array> ] [ stackbuf ] if* :> items
-        items-count iota [ items nth quot call ] each
+        items-count <iota> [ items nth quot call ] each
         object quot state stackbuf count (NSFastEnumeration-each)
     ] unless ; inline recursive
 
index 4814a36e48beeba763efba1f82e183160529d472..63cbe0224e213cb86749cace70752d17c6b6d05f 100644 (file)
@@ -223,7 +223,7 @@ ERROR: no-objc-type name ;
     (free) ;
 
 : method-arg-types ( method -- args )
-    dup method_getNumberOfArguments iota
+    dup method_getNumberOfArguments <iota>
     [ method-arg-type ] with map ;
 
 : method-return-type ( method -- ctype )
index 661ed3f08dbd0d8e992bc2f1bbb55cf802fb5bbb..9363ede491f55c521b8f12a550bef2f03dd04420 100644 (file)
@@ -47,7 +47,7 @@ MACRO: (casep) ( assoc -- quot ) (casep>quot) ;
     [ swap nth ] 2bi * ;
 
 : conditional-probabilities ( seq -- seq' )
-    dup length iota [ (conditional-probabilities) ] with map ;
+    dup length <iota> [ (conditional-probabilities) ] with map ;
 
 : (direct>conditional) ( assoc -- assoc' )
     [ keys conditional-probabilities ] [ values ] bi zip ;
index 2f7d6a4413f6dc846743bceb4104fbe1b2ff5cf6..57e96997f26cbb5e7028c741acbb618607246ce0 100644 (file)
@@ -26,7 +26,7 @@ IN: compiler.cfg.builder.alien
 
 : unbox-parameters ( parameters -- vregs reps )
     [
-        [ length iota <reversed> ] keep
+        [ length <iota> <reversed> ] keep
         [ [ <ds-loc> peek-loc ] [ base-type ] bi* unbox-parameter ]
         2 2 mnmap [ concat ] bi@
     ]
index bd9e195cae04e1f1d58418d0bfbd93f4bef42e50..d963c961408b096602b08396b42b0ff02689b54a 100644 (file)
@@ -74,7 +74,7 @@ V{ } 5 test-bb
 { t } [ 0 5 [a,b] [ get dom-parent 0 get eq? ] all? ] unit-test
 
 : non-det-test ( -- cfg )
-    9 iota [ V{ } clone over insns>block ] { } map>assoc dup
+    9 <iota> [ V{ } clone over insns>block ] { } map>assoc dup
     {
         { 0 1 }
         { 1 2 } { 1 7 }
index ff6e1b9b5c4ddaa57ffc7b11daf076d5f231fc80..65623ce47390ea211810ccd9e055462224de36d9 100644 (file)
@@ -75,7 +75,7 @@ IN: compiler.cfg.intrinsics.allot
 :: zero-byte-array ( len reg -- )
     0 ^^load-literal :> elt
     reg ^^tagged>integer :> reg
-    len cell align cell /i iota [
+    len cell align cell /i <iota> [
         [ elt reg ] dip cells byte-array-offset + int-rep f ##store-memory-imm,
     ] each ;
 
index 083a73b04af0dd2744e463997a2f574f9d839366..3d64fe2c6ef56f398c09efb65e1f8701da0b7928 100644 (file)
@@ -76,7 +76,7 @@ CONSTANT: rep>half {
 : >variable-shuffle ( shuffle rep -- shuffle' )
     rep-component-type heap-size
     [ dup <repetition> >byte-array ]
-    [ iota >byte-array ] bi
+    [ <iota> >byte-array ] bi
     '[ _ n*v _ v+ ] map concat ;
 
 : ^load-immediate-shuffle ( shuffle rep -- dst )
index 9c3e9c4aa603c948b77b9ae84cc9c82398d49727..60620c00397aee3664aeb72085bd7a7bcf19101b 100644 (file)
@@ -29,7 +29,7 @@ V{ } 2 test-bb
 ] unit-test
 
 { { 0 1 2 3 4 5 } } [
-    6 iota [ V{ } clone over insns>block ] { } map>assoc dup
+    6 <iota> [ V{ } clone over insns>block ] { } map>assoc dup
     {
         { 0 1 } { 0 2 } { 0 5 }
         { 2 3 }
index cb95300ca089fbd2a974000d4f99df173c1206b5..5c26f6a328393b1daf881782823fe995c50a6dc8 100644 (file)
@@ -91,7 +91,7 @@ IN: compiler.cfg.liveness.tests
 ! liveness-step
 { 3 } [
     init-liveness
-    3 iota [ <basic-block> swap >>number ] map <basic-block>
+    3 <iota> [ <basic-block> swap >>number ] map <basic-block>
     [ connect-Nto1-bbs ] keep liveness-step length
 ] unit-test
 
index 402d74d6cb74cc803383503d2070c24b452b1830..2c3435daa005d738aa98f1bcc90cb7a67885825c 100644 (file)
@@ -13,7 +13,7 @@ IN: compiler.cfg.rpo
     ] [ drop ] if ; inline recursive
 
 : number-blocks ( blocks -- )
-    dup length iota <reversed>
+    dup length <iota> <reversed>
     [ >>number drop ] 2each ;
 
 : post-order ( cfg -- blocks )
index d119e17958d8fef27112ee1c76bb3fc26c001e73..bc7fe6f6db5817919a82c48c7ecc7c1d62d34674 100644 (file)
@@ -98,7 +98,7 @@ IN: compiler.cfg.ssa.destruction.coalescing.tests
 : make-phi-inputs ( -- assoc )
     H{ } clone [
         { 2287 2288 } [
-            10 iota 1 sample first rot set-at
+            10 <iota> 1 sample first rot set-at
         ] with each
     ] keep ;
 
index f02e6dfaa4a14bf115ebd964ab540c76c77eccb4..ce9b1b2e5c3052a761cd868f184aec8e3199759e 100644 (file)
@@ -58,7 +58,7 @@ SYMBOLS: locs>vregs local-peek-set replaces ;
     height-state get global-loc>local replaces get set-at ;
 
 : kill-locations ( begin inc -- seq )
-    0 min neg iota [ swap - ] with map ;
+    0 min neg <iota> [ swap - ] with map ;
 
 : local-kill-set ( ds-begin ds-inc rs-begin rs-inc -- set )
     [ kill-locations ] 2bi@
index 9bc5d9a8c418e7f21a23d3f634e55de93bf249bc..0c24d993e28f8f5eb55c6be06f3a2dd95e91cb68 100644 (file)
@@ -21,7 +21,7 @@ IN: compiler.cfg.stacks.padding
     swap 2dup second member? [ 2drop 2 ] [ first >= [ 1 ] [ 0 ] if ] if ;
 
 : shift-stack ( n stack -- stack' )
-    first2 pick '[ _ + ] map [ 0 >= ] filter pick 0 max iota sets:union
+    first2 pick '[ _ + ] map [ 0 >= ] filter pick 0 max <iota> sets:union
     [ + ] dip 2array ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
index 24bc6472181c451e7d9543891d0510f4653b3107..9b6e3aef994c119685dc794ee437d5e61eb5ee27 100644 (file)
@@ -24,7 +24,7 @@ IN: compiler.cfg.stacks
     [ swap new swap >>n ] with map <reversed> ;
 
 : stack-locs ( loc-class n -- locs )
-    iota create-locs ;
+    <iota> create-locs ;
 
 : (load-vregs) ( n loc-class -- vregs )
     swap stack-locs [ peek-loc ] map ;
index 79dd2ce2b80c5c429e8ffb96296c4d8a4f3b7295..d020409e2aa86d15bab0e295dfb4ba40dcd220fd 100644 (file)
@@ -27,7 +27,7 @@ GENERIC: >expr ( insn -- expr )
     [
         [ , [ f <array> ] % ]
         [
-            dup iota [
+            dup <iota> [
                 - 1 - , [ swap [ set-array-nth ] keep ] %
             ] with each
         ] bi
index d17e4ce289aae9d8d17f4094ba330454d9cd6e55..1c0e8ac88ce9cbd57c6cf78241d211ffd39f368c 100644 (file)
@@ -13,7 +13,7 @@ IN: compiler.cfg.value-numbering.simd
 ! should be redone completely.
 
 : useless-shuffle-vector-imm? ( insn -- ? )
-    [ shuffle>> ] [ rep>> rep-length iota ] bi sequence= ;
+    [ shuffle>> ] [ rep>> rep-length <iota> ] bi sequence= ;
 
 : compose-shuffle-vector-imm ( outer inner -- insn' )
     2dup [ rep>> ] bi@ eq? [
index cab83b89acd8b0efa9fc89c4ba077b2146b8f5c8..294ea1be3e2d91305d41a3ca514051da93f0e8ec 100644 (file)
@@ -316,7 +316,7 @@ cell 4 = [
 
 ! Bug with ##return node construction
 : return-recursive-bug ( nodes -- ? )
-    { fixnum } declare iota [
+    { fixnum } declare <iota> [
         dup 3 bitand 1 = [ drop t ] [
             dup 3 bitand 2 = [
                 return-recursive-bug
index 50888e54c1b43f8501fa752b300102a879093727..1bf5e052d9a7bafccc60458d4a1a977da29e4dbf 100644 (file)
@@ -47,7 +47,7 @@ IN: compiler.tests.curry
     ] { } make ; inline
 
 [ t ] [| |
-    1000 iota [ drop 1,000,000 random 1,000,000 random ] H{ } map>assoc :> a-hashtable
+    1000 <iota> [ drop 1,000,000 random 1,000,000 random ] H{ } map>assoc :> a-hashtable
     a-hashtable [ [ drop , ] funky-assoc>map ] compile-call
     a-hashtable keys =
 ] unit-test
index 28dbe3bc95ad37ebd132c0c0ad8cfd83b4774cb3..52ccb4d275dad39dafa4a370d89f40a0a2fcc2cd 100644 (file)
@@ -339,7 +339,7 @@ ERROR: bug-in-fixnum* x y a b ;
 
 [ ] [
     10000 [
-        5 random iota [ drop 32 random-bits ] map product >bignum
+        5 random <iota> [ drop 32 random-bits ] map product >bignum
         dup [ bignum>fixnum ] keep compiled-bignum>fixnum =
         [ drop ] [ "Oops" throw ] if
     ] times
index 8565b913464d7b1479df23fbebd4e3305dae0095..ca3893933691a926d18ce280f123e812527590b0 100644 (file)
@@ -92,7 +92,7 @@ TUPLE: pred-test ;
 : double-label-2 ( a -- b )
     dup array? [ ] [ ] if 0 t double-label-1 ;
 
-[ 0 ] [ 10 iota double-label-2 ] unit-test
+[ 0 ] [ 10 <iota> double-label-2 ] unit-test
 
 ! regression
 GENERIC: void-generic ( obj -- * )
@@ -337,7 +337,7 @@ TUPLE: some-tuple x ;
 [ 5 ] [ { 1 2 { 3 { 4 5 } } } deep-find-test ] unit-test
 [ f ] [ { 1 2 { 3 { 4 } } } deep-find-test ] unit-test
 
-[ B{ 0 1 2 3 4 5 6 7 } ] [ [ 8 iota [ ] B{ } map-as ] compile-call ] unit-test
+[ B{ 0 1 2 3 4 5 6 7 } ] [ [ 8 <iota> [ ] B{ } map-as ] compile-call ] unit-test
 
 [ 0 ] [ 1234 [ { fixnum } declare -64 shift ] compile-call ] unit-test
 
index ad2090989e37b3edf4918e385f3accbde55c66b0..40db63ef09a007a60f8b35f93d18149b397ca65f 100644 (file)
@@ -4,7 +4,7 @@ compiler.units vocabs tools.test specialized-arrays.private ;
 
 STRUCT: my-struct { x int } ;
 SPECIALIZED-ARRAY: my-struct
-: my-word ( a -- b ) iota [ my-struct <struct-boa> ] my-struct-array{ } map-as ;
+: my-word ( a -- b ) <iota> [ my-struct <struct-boa> ] my-struct-array{ } map-as ;
 
 [ ] [
     [
index 7630a0e332288f0d2f668480977bef7d1619e4c9..53a4ce8fdabbde178b298aeb326af67dd85620ee 100644 (file)
@@ -329,23 +329,23 @@ cell-bits 32 = [
 ] unit-test
 
 { t } [
-    [ { fixnum } declare iota [ drop ] each ]
+    [ { fixnum } declare <iota> [ drop ] each ]
     { < <-integer-fixnum +-integer-fixnum + } inlined?
 ] unit-test
 
 { t } [
-    [ { fixnum } declare iota 0 [ + ] reduce ]
+    [ { fixnum } declare <iota> 0 [ + ] reduce ]
     { < <-integer-fixnum nth-unsafe } inlined?
 ] unit-test
 
 { f } [
-    [ { fixnum } declare iota 0 [ + ] reduce ]
+    [ { fixnum } declare <iota> 0 [ + ] reduce ]
     \ +-integer-fixnum inlined?
 ] unit-test
 
 { t } [
     [
-        { integer } declare iota [ ] map
+        { integer } declare <iota> [ ] map
     ] \ integer>fixnum inlined?
 ] unit-test
 
@@ -388,7 +388,7 @@ cell-bits 32 = [
 
 { t } [
     [
-        { integer } declare iota [ 0 >= ] map
+        { integer } declare <iota> [ 0 >= ] map
     ] { >= fixnum>= } inlined?
 ] unit-test
 
index fc03c8575677471d511789997e8ef5df7391036c..40e40813343f9dbb5c082b47ceddcae8caf0961a 100644 (file)
@@ -31,7 +31,7 @@ M: #branch remove-dead-code*
     pad-with-bottom >>phi-in-d drop ;
 
 : live-value-indices ( values -- indices )
-    [ length iota ] keep live-values get
+    [ length <iota> ] keep live-values get
     '[ _ nth _ key? ] filter ; inline
 
 : drop-indexed-values ( values indices -- node )
index 3cf0d2e83686bd12ff89f5d4a9371417ceb13c15..96a7b36e7169b199e91f758652c0a9b8d6ee43fd 100644 (file)
@@ -77,7 +77,7 @@ TUPLE: declared-fixnum { x fixnum } ;
 
 { t } [
     [
-        { fixnum } declare iota 0 swap
+        { fixnum } declare <iota> 0 swap
         [
             drop 615949 * 797807 + 20 2^ rem dup 19 2^ -
         ] map
@@ -98,7 +98,7 @@ TUPLE: declared-fixnum { x fixnum } ;
 
 { t } [
     [
-        { integer } declare iota [ 256 mod ] map
+        { integer } declare <iota> [ 256 mod ] map
     ] { mod fixnum-mod } inlined?
 ] unit-test
 
@@ -134,7 +134,7 @@ TUPLE: declared-fixnum { x fixnum } ;
 
 { t } [
     [
-        { iota-tuple } declare [ 256 rem ] map
+        { iota } declare [ 256 rem ] map
     ] { mod fixnum-mod rem } inlined?
 ] unit-test
 
index 67b0e5cba1630ea7728470cfbf868e5785dbd6e7..75f9de07e39898e557ca259d084fce7b6f31d603 100644 (file)
@@ -255,7 +255,7 @@ CONSTANT: lookup-table-at-max 256
     } 1&& ;
 
 : lookup-table-seq ( assoc -- table )
-    [ keys supremum 1 + iota ] keep '[ _ at ] { } map-as ;
+    [ keys supremum 1 + <iota> ] keep '[ _ at ] { } map-as ;
 
 : lookup-table-quot ( seq -- newquot )
     lookup-table-seq
index 03927e5a48ab78d437638e074a34a8571622d593..33d7b17f052b57747f8e7cde55769943abb2db12 100644 (file)
@@ -27,7 +27,7 @@ TUPLE: huffman-code
 :: all-patterns ( huffman-code n -- seq )
     n log2 huffman-code size>> - :> free-bits
     free-bits 0 >
-    [ free-bits 2^ iota [ huffman-code code>> free-bits 2^ * + ] map ]
+    [ free-bits 2^ <iota> [ huffman-code code>> free-bits 2^ * + ] map ]
     [ huffman-code code>> free-bits neg 2^ /i 1array ] if ;
 
 :: huffman-each ( ... tdesc quot: ( ... huffman-code -- ... ) -- ... )
index 27e35daef858bc6becdf183ffa0305ea0424e936..400f02e0e24ccd21266aaed9548e6815799ca400 100644 (file)
@@ -59,7 +59,7 @@ CONSTANT: clen-shuffle { 16 17 18 0 8 7 9 6 10 5 11 4 12 3 13 2 14 1 15 }
     ] reduce
     [ dup array? [ second 0 <repetition> ] [ 1array ] if ] map concat
     nip swap cut 2array
-    [ [ length>> iota ] [ ] bi get-table ] map ;
+    [ [ length>> <iota> ] [ ] bi get-table ] map ;
 
 MEMO: static-huffman-tables ( -- obj )
     [
@@ -69,7 +69,7 @@ MEMO: static-huffman-tables ( -- obj )
         280 287 [a,b] length [ 8 ] replicate append
     ] append-outputs
     0 31 [a,b] length [ 5 ] replicate 2array
-    [ [ length>> iota ] [ ] bi get-table ] map ;
+    [ [ length>> <iota> ] [ ] bi get-table ] map ;
 
 CONSTANT: length-table
     {
index cb1d70c55e3e530abb867a7cb71fc411042c8080..7c9adc9c79b03c88080d60b6136c213a00f32466 100755 (executable)
@@ -20,7 +20,7 @@ TUPLE: tiff-lzw < lzw ;
 TUPLE: gif-lzw < lzw ;
 
 : initial-uncompress-table ( size -- seq )
-    iota [ 1vector ] V{ } map-as ;
+    <iota> [ 1vector ] V{ } map-as ;
 
 : reset-lzw-uncompress ( lzw -- lzw )
     dup end-of-information-code>> 1 + initial-uncompress-table >>table
index 54e343f88acd904827cd0e89861ac64c4cea3619..6e3a8eb8abc29be74a8d31bdb2cca26b973ed6e3 100644 (file)
@@ -17,12 +17,12 @@ IN: concurrency.combinators.tests
 [ error>> "Even" = ] must-fail-with
 
 { V{ 0 3 6 9 } }
-[ 10 iota [ 3 mod zero? ] parallel-filter ] unit-test
+[ 10 <iota> [ 3 mod zero? ] parallel-filter ] unit-test
 
 { 10 }
 [
     V{ } clone
-    10 iota over [ push ] curry parallel-each
+    10 <iota> over [ push ] curry parallel-each
     length
 ] unit-test
 
@@ -41,7 +41,7 @@ IN: concurrency.combinators.tests
 { 20 }
 [
     V{ } clone
-    10 iota 10 iota pick [ [ push ] [ push ] bi ] curry 2parallel-each
+    10 <iota> 10 iota pick [ [ push ] [ push ] bi ] curry 2parallel-each
     length
 ] unit-test
 
index 7dafa8560ef94cc8819e834b85ff9074ed366578..00799950bf0fed274e56a6f81d009186a7ac05f1 100644 (file)
@@ -34,7 +34,7 @@ SINGLETON: retryable
     ] 2map >>bind-params ;
 
 M: retryable execute-statement* ( statement type -- )
-    drop [ retries>> iota ] [
+    drop [ retries>> <iota> ] [
         [
             nip
             [ query-results dispose t ]
index b8b00e52c661ec38b2585fbec70756d43e88d6bb..ea89166e51aeefa3e3bae399b8047cf89e0ff3bb 100644 (file)
@@ -74,7 +74,7 @@ test-2 "TEST2" {
             test-2 ensure-table
         ] with-db
     ] [
-        10 iota [
+        10 <iota> [
             drop
             10 [
                 dup [
@@ -93,7 +93,7 @@ test-2 "TEST2" {
     ] [
         <db-pool> [
             [
-                10 iota [
+                10 <iota> [
                     10 [
                         test-1-tuple insert-tuple yield
                     ] times
index dc778636731a680b31f1a0d7ef1bea0b73bfad8c..a61afe7eac84420eefb1695d9d3d451ef8080948 100644 (file)
@@ -65,7 +65,7 @@ SYMBOLS: a b c d e f g h ;
 { "hi" 3 } [ "h" "i" 3 [ append ] funny-dip ] unit-test
 
 { { 1 2 3 } } [
-    3 1 '[ _ iota [ _ + ] map ] call
+    3 1 '[ _ <iota> [ _ + ] map ] call
 ] unit-test
 
 { { 1 { 2 { 3 } } } } [
index ca7c2502ec06fc77f2fb998346d5da89da38a2fa..f2aaff1656269dee171572e9a4e78df137b3dc61 100755 (executable)
@@ -315,7 +315,7 @@ CONSTANT: pov-values
     } case ;
 
 : fill-mouse-state ( buffer count -- state )
-    iota [ +mouse-state+ get-global ] 2dip swap [ nth (fill-mouse-state) ] curry each ;
+    <iota> [ +mouse-state+ get-global ] 2dip swap [ nth (fill-mouse-state) ] curry each ;
 
 : get-device-state ( device DIJOYSTATE2 -- )
     [ dup IDirectInputDevice8W::Poll check-ole32-error ] dip
index b6fde1c85ddb8221e917f02e15c3abbad4cbcbf7..e2084a1515e9747f925c24ef282d1b0df168d1cf 100644 (file)
@@ -84,7 +84,7 @@ M: linux x>hid-bit-order
     } ; inline
 
 : x-bits>hid-bits ( bit-array -- bit-array )
-    256 iota zip [ first ] filter values
+    256 <iota> zip [ first ] filter values
     x>hid-bit-order [ nth ] curry map
     256 <bit-array> swap [ t swap pick set-nth ] each ;
 
index 44e3fda67309ebd2c1207111084c944121e072d7..29b724918355703dd4d638f593fba027797daa52 100644 (file)
@@ -78,7 +78,7 @@ M: linux x>hid-bit-order
     } ; inline
 
 : x-bits>hid-bits ( bit-array -- bit-array )
-    256 iota [ 2array ] { } 2map-as [ first ] filter values
+    256 <iota> [ 2array ] { } 2map-as [ first ] filter values
     x>hid-bit-order [ nth ] curry map
     256 <bit-array> swap [ t swap pick set-nth ] each ;
 
index 698d49bf791adcdd786aed40c2754d59ccecb6ca..37d4733d255445c06094f64e83ec6c096ac367dd 100644 (file)
@@ -91,7 +91,7 @@ MACRO: spread* ( n -- quot )
 MACRO: nspread* ( m n -- quot )
     [ drop [ ] ] [
         [ * 0 ] [ drop neg ] 2bi
-        <range> rest >array dup length iota <reversed>
+        <range> rest >array dup length <iota> <reversed>
         [
             '[ [ [ _ ndip ] curry ] _ ndip ]
         ] 2map dup rest-slice [ [ compose ] compose ] map! drop
@@ -122,7 +122,7 @@ MACRO: mnswap ( m n -- quot )
     1 + '[ _ -nrot ] swap '[ _ _ napply ] ;
 
 MACRO: nweave ( n -- quot )
-    [ dup iota <reversed> [ '[ _ _ mnswap ] ] with map ] keep
+    [ dup <iota> <reversed> [ '[ _ _ mnswap ] ] with map ] keep
     '[ _ _ ncleave ] ;
 
 : nbi-curry ( n -- )
index 02accfcefb3329f3d3ef50b31fbec455b9f41156..83b6dcbdb9743a7c4c3e4fc6feb848633140ad5b 100644 (file)
@@ -89,7 +89,7 @@ HELP: <groups>
 { $examples
     { $example
         "USING: arrays kernel prettyprint sequences grouping ;"
-        "9 iota >array 3 <groups>"
+        "9 <iota> >array 3 <groups>"
         "dup [ reverse! drop ] each concat >array ."
         "{ 2 1 0 5 4 3 8 7 6 }"
     }
index 7fa0d5fae0ca16a41e1bd84185d33ccf2e5c0079..49a0d3172563bd446a1bbe1b49ff03b36b98aa5e 100644 (file)
@@ -31,7 +31,7 @@ IN: heaps.tests
     [ heap-push-all ] keep heap-pop-all ;
 
 : random-alist ( n -- alist )
-    iota [
+    <iota> [
         drop 32 random-bits dup number>string
     ] H{ } map>assoc >alist ;
 
@@ -57,7 +57,7 @@ IN: heaps.tests
 : test-entry-indices ( n -- ? )
     random-alist
     <min-heap> [ heap-push-all ] keep
-    data>> dup length iota swap [ index>> ] map sequence= ;
+    data>> dup length <iota> swap [ index>> ] map sequence= ;
 
 14 [
     [ t ] swap [ 2^ test-entry-indices ] curry unit-test
index b5b41603d263f90e651c3b81648b90034f4a00d5..2cea955f0780c384e50d45b2d6a2075496ba9a1e 100644 (file)
@@ -24,7 +24,7 @@ M: object specializer-declaration class-of ;
     "specializer" word-prop ;
 
 : make-specializer ( specs -- quot )
-    dup length iota <reversed>
+    dup length <iota> <reversed>
     [ (picker) 2array ] 2map
     [ drop object eq? ] assoc-reject
     [ [ t ] ] [
index a8439e5113aca3eb251c8bac17b221395fc9ed47..95b77e756e4e9b732d65170f2b81b7fdcee85599 100644 (file)
@@ -171,7 +171,7 @@ PRIVATE>
 :: each-pixel ( ... image quot: ( ... x y pixel -- ... ) -- ... )
     image dim>> first2 :> ( width height )
     image bytes-per-pixel :> n
-    height width [ iota ] bi@ [| y x |
+    height width [ <iota> ] bi@ [| y x |
         y width * x + :> start
         start n * :> from
         from n + :> to
index 4d33f4c26021a26a89da311a342cdfe177028001..cebb6ec522e2536a7ab47d6ae17d79e21605b82c 100644 (file)
@@ -6,7 +6,7 @@ math.ranges math.vectors sequences sequences.deep fry ;
 IN: images.processing
 
 : coord-matrix ( dim -- m )
-    [ iota ] map first2 cartesian-product ;
+    [ <iota> ] map first2 cartesian-product ;
 
 : map^2 ( m quot -- m' ) '[ _ map ] map ; inline
 : each^2 ( m quot -- m' ) '[ _ each ] each ; inline
index 1d96475841a569159dfae5ee2c078c66f8c4326f..9419293d16c0af3edac86491b5c2ba9071f72156 100644 (file)
@@ -18,7 +18,7 @@ SYMBOL: jis212
 "vocab:io/encodings/iso2022/212.txt" load-codetable-file jis212 set-global
 
 SYMBOL: ascii
-128 iota dup zip >biassoc ascii set-global
+128 <iota> dup zip >biassoc ascii set-global
 
 TUPLE: iso2022-state type ;
 
index 0fba9e4e1900715a6650af9e39e54a3a5f6ecae7..93ad08cc7a2b35c967e4b71bc0852a3acfbe2d69 100644 (file)
@@ -26,7 +26,7 @@ SYMBOL: unique-retries
     unique-length get random-string ;
 
 : retry ( quot: ( -- ? ) n -- )
-    iota swap [ drop ] prepose attempt-all ; inline
+    <iota> swap [ drop ] prepose attempt-all ; inline
 
 PRIVATE>
 
index d30bdaa6ebfe59f63e9f44f3934dcb5946e8ade0..4299209aa938be24183e56ec20d73858db366601 100644 (file)
@@ -11,7 +11,7 @@ locals math namespaces sequences tools.test ;
     { } [
         path binary [
             [
-                100,000 iota
+                100,000 <iota>
                 0
                 100,000 int malloc-array &free [ copy ] keep write
             ] with-destructors
@@ -20,7 +20,7 @@ locals math namespaces sequences tools.test ;
 
     { t } [
         path binary [
-            100,000 4 * read int cast-array 100,000 iota sequence=
+            100,000 4 * read int cast-array 100,000 <iota> sequence=
         ] with-file-reader
     ] unit-test
 
index 4aec171ae34a64fe11ac1d692c7244a47edc27d0..413d323aeeae1aff184f0c7f5be08745d55eff2a 100644 (file)
@@ -338,7 +338,7 @@ M: ssl-handle dispose*
     X509_get_issuer_name x509name>string ;
 
 : name-stack>sequence ( name-stack -- seq )
-    dup sk_num iota [ sk_value GENERAL_NAME_st memory>struct ] with map ;
+    dup sk_num <iota> [ sk_value GENERAL_NAME_st memory>struct ] with map ;
 
 : alternative-dns-names ( certificate -- dns-names )
     NID_subject_alt_name f f X509_get_ext_d2i
index 1cffdf853214140342d89d013280cafb918d7954..ecc72ae65bf9532d9bba19524187bbe12f583621 100644 (file)
@@ -206,7 +206,7 @@ HELP: foreground
 { $examples
     { $code
         "USING: colors.gray io.styles hashtables sequences kernel math ;"
-        "10 iota ["
+        "10 <iota> ["
         "    \"Hello world\\n\""
         "    swap 10 / 1 <gray> foreground associate format"
         "] each"
@@ -218,7 +218,7 @@ HELP: background
 { $examples
     { $code
         "USING: colors hashtables io io.styles kernel math sequences ;"
-        "10 iota ["
+        "10 <iota> ["
         "    \"Hello world\\n\""
         "    swap 10 / 1 over - over 1 <rgba>"
         "    background associate format"
index 7c0b62224c4144a3f9642d574e998879c14b5d3f..fc7589209ab47e441e8b39cb189d3684f42d9f26 100644 (file)
@@ -20,15 +20,15 @@ TYPED:: loop-step ( i j matrix: array old new step -- )
     i 1 + j 1 + matrix nth-unsafe set-nth-unsafe ; inline
 
 : lcs-initialize ( |str1| |str2| -- matrix )
-    iota [ drop 0 <array> ] with map ;
+    <iota> [ drop 0 <array> ] with map ;
 
 : levenshtein-initialize ( |str1| |str2| -- matrix )
-    [ iota ] bi@ [ [ + ] curry map ] with map ;
+    [ <iota> ] bi@ [ [ + ] curry map ] with map ;
 
 :: run-lcs ( old new init step -- matrix )
     old length 1 + new length 1 + init call :> matrix
-    old length iota [| i |
-        new length iota [| j |
+    old length <iota> [| i |
+        new length <iota> [| j |
             i j matrix old new step loop-step
         ] each
     ] each matrix ; inline
index 73d8765735a946cf367f16cf79860c4faa01b9b5..812d1b9c92c7719af957cc92e292c8b1dfa7dd5c 100644 (file)
@@ -42,7 +42,7 @@ M: wrapper expand-macros* wrapped>> literal ;
     stack get pop end
     [ [ expand-macros ] [ ] map-as '[ _ dip ] % ]
     [
-        length iota [ <reversed> ] keep
+        length <iota> [ <reversed> ] keep
         [ '[ _ ndrop _ nnip call ] [ ] like ] 2map , \ dispatch ,
     ] bi ;
 
index 658d3586e005c9b7cb20e33c2e21ad4b2aac8912..b5e3f3816c96b135b00ae8e86cafc16291eb9951 100644 (file)
@@ -83,7 +83,7 @@ DEFER: byte-bit-count
 <<
 
 \ byte-bit-count
-256 iota [
+256 <iota> [
     8 <bits> 0 [ [ 1 + ] when ] reduce
 ] B{ } map-as '[ 0xff bitand _ nth-unsafe ]
 ( byte -- table ) define-declared
index 7523bffb24dff19596dd020689c7c803702ca97d..f178f8cc2fc0dc36abf00328e8e29af1575f3b22 100644 (file)
@@ -73,7 +73,7 @@ HELP: combination
 { $notes "Combinations are 0-based and a bounds error will be thrown if " { $snippet "m" } " is larger than " { $snippet "seq length k nCk" } "." }
 { $examples
     { $example "USING: math.combinatorics sequences prettyprint ;"
-        "6 7 iota 4 combination ." "{ 0 1 3 6 }" }
+        "6 7 <iota> 4 combination ." "{ 0 1 3 6 }" }
     { $example "USING: math.combinatorics prettyprint ;"
         "0 { \"a\" \"b\" \"c\" \"d\" } 2 combination ." "{ \"a\" \"b\" }" }
 } ;
index e7dd4164684330a0a4ae30639f347ecf4d72d18b..55fca4b72b63e7d905b658a5401ef5ba8d21873c 100644 (file)
@@ -30,9 +30,9 @@ IN: math.combinatorics.tests
 { { 0 1 3 2 } } [ { 0 0 1 0 } >permutation ] unit-test
 { { 1 2 0 6 3 5 4 } } [ { 1 1 0 3 0 1 0 } >permutation ] unit-test
 
-{ { 0 1 2 3 } } [ 0 4 iota permutation-indices ] unit-test
-{ { 0 1 3 2 } } [ 1 4 iota permutation-indices ] unit-test
-{ { 1 2 0 6 3 5 4 } } [ 859 7 iota permutation-indices ] unit-test
+{ { 0 1 2 3 } } [ 0 4 <iota> permutation-indices ] unit-test
+{ { 0 1 3 2 } } [ 1 4 <iota> permutation-indices ] unit-test
+{ { 1 2 0 6 3 5 4 } } [ 859 7 <iota> permutation-indices ] unit-test
 
 { { "a" "b" "c" "d" } } [ 0 { "a" "b" "c" "d" } permutation ] unit-test
 { { "d" "c" "b" "a" } } [ 23 { "a" "b" "c" "d" } permutation ] unit-test
@@ -102,7 +102,7 @@ IN: math.combinatorics.tests
 { { 2 1 3 } } [ { 1 2 3 } [ first 2 = ] find-permutation ] unit-test
 
 { { { 0 1 2 } { 0 2 1 } { 1 0 2 } { 1 2 0 } { 2 0 1 } { 2 1 0 } } }
-[ 3 iota <permutations> >array ] unit-test
+[ 3 <iota> <permutations> >array ] unit-test
 
 { { "as" "ad" "af" "sa" "sd" "sf" "da" "ds" "df" "fa" "fs" "fd" } }
 [ "asdf" 2 <k-permutations> >array ] unit-test
index efa2d2ee07b72632a063a0d304a87c085e619074..b1a1a21f71c4fa660bb959ef8f013323b66bfdb3 100644 (file)
@@ -17,7 +17,7 @@ GENERIC: nths-unsafe ( indices seq -- seq' )
 M: string nths-unsafe (nths-unsafe) ;
 M: array nths-unsafe (nths-unsafe) ;
 M: vector nths-unsafe (nths-unsafe) ;
-M: iota-tuple nths-unsafe (nths-unsafe) ;
+M: iota nths-unsafe (nths-unsafe) ;
 M: object nths-unsafe (nths-unsafe) ;
 
 : possible? ( n m -- ? )
@@ -57,8 +57,8 @@ MEMO: factorial ( n -- n! )
 : permutation-indices ( n seq -- permutation )
     length [ factoradic ] dip 0 pad-head >permutation ;
 
-: permutation-iota ( seq -- iota )
-    length factorial iota ; inline
+: permutation-iota ( seq -- <iota> )
+    length factorial <iota> ; inline
 
 PRIVATE>
 
@@ -101,7 +101,7 @@ DEFER: next-permutation
 <PRIVATE
 
 : permutations-quot ( seq quot -- seq quot' )
-    [ [ permutation-iota ] [ length iota >array ] [ ] tri ] dip
+    [ [ permutation-iota ] [ length <iota> >array ] [ ] tri ] dip
     '[ drop _ [ _ nths-unsafe @ ] keep next-permutation drop ] ; inline
 
 PRIVATE>
@@ -216,7 +216,7 @@ INSTANCE: combinations immutable-sequence
 
 :: combinations-quot ( seq k quot -- seq quot' )
     seq length :> n
-    n k nCk iota k iota >array seq quot n
+    n k nCk <iota> k iota >array seq quot n
     '[ drop _ [ _ nths-unsafe @ ] keep _ next-combination drop ] ; inline
 
 PRIVATE>
index ce061ae4dc2b8f5293fae3dcd36f2e331a467d80..26c5bbfc50f2f50a9fe597416dc8ae38161599cc 100644 (file)
@@ -373,7 +373,7 @@ M: float round dup sgn 2 /f + truncate ;
 : roots ( x t -- seq )
     [ [ log ] [ recip ] bi* * e^ ]
     [ recip 2pi * 0 swap complex boa e^ ]
-    [ iota [ ^ * ] 2with map ] tri ;
+    [ <iota> [ ^ * ] 2with map ] tri ;
 
 : sigmoid ( x -- y ) neg e^ 1 + recip ; inline
 
index e729b232bdcf2ada668543763faa0d186558a0f1..b3ddf4c853ff9629495bca387ea86e7dff07f7b0 100644 (file)
@@ -322,7 +322,7 @@ unary-ops [
     ] if ;
 
 binary-ops [
-    [ [ t ] ] dip '[ 8000 iota [ drop _ binary-test ] all? ] unit-test
+    [ [ t ] ] dip '[ 8000 <iota> [ drop _ binary-test ] all? ] unit-test
 ] each
 
 : comparison-ops ( -- alist )
@@ -339,7 +339,7 @@ binary-ops [
     second execute( a b -- ? ) dup incomparable eq? [ 2drop t ] [ = ] if ;
 
 comparison-ops [
-    [ [ t ] ] dip '[ 8000 iota [ drop _ comparison-test ] all? ] unit-test
+    [ [ t ] ] dip '[ 8000 <iota> [ drop _ comparison-test ] all? ] unit-test
 ] each
 
 { t } [ -10 10 [a,b] 0 100 [a,b] assume> 0 10 (a,b] = ] unit-test
@@ -377,7 +377,7 @@ comparison-ops [
 
 commutative-ops [
     [ [ t ] ] dip '[
-        8000 iota [
+        8000 <iota> [
             drop
             random-interval-or-empty random-interval-or-empty _
             [ execute ] [ swapd execute ] 3bi =
index 176a140d4f5325c8777d706a8a17b649302253c2..d9117f023f53683fd3ee7bc83f8fbe2195fb3dd4 100644 (file)
@@ -42,7 +42,7 @@ SYMBOL: matrix
     [ [ clear-scale ] 2keep [ n*v ] dip v+ ] change-row ;
 
 : rows-from ( row# -- slice )
-    rows dup iota <slice> ;
+    rows dup <iota> <slice> ;
 
 : clear-col ( col# row# rows -- )
     [ nth-row ] dip [ [ 2dup ] dip (clear-col) ] each 2drop ;
@@ -79,9 +79,9 @@ SYMBOL: matrix
 
 : reduced ( matrix' -- matrix'' )
     [
-        rows iota <reversed> [
+        rows <iota> <reversed> [
             dup nth-row leading drop
-            [ swap dup iota clear-col ] [ drop ] if*
+            [ swap dup <iota> clear-col ] [ drop ] if*
         ] each
     ] with-matrix ;
 
index d1894108c083b9742d7a348452e1bfe40d9a1c57..55105965a594734cb726c0dac428235c521afe38 100644 (file)
@@ -24,22 +24,22 @@ IN: math.matrices
     1 <repetition> diagonal-matrix ; inline
 
 : eye ( m n k -- matrix )
-    [ [ iota ] bi@ ] dip neg '[ _ + = 1 0 ? ] cartesian-map ;
+    [ [ <iota> ] bi@ ] dip neg '[ _ + = 1 0 ? ] cartesian-map ;
 
 : hilbert-matrix ( m n -- matrix )
-    [ iota ] bi@ [ + 1 + recip ] cartesian-map ;
+    [ <iota> ] bi@ [ + 1 + recip ] cartesian-map ;
 
 : toeplitz-matrix ( n -- matrix )
-    iota dup [ - abs 1 + ] cartesian-map ;
+    <iota> dup [ - abs 1 + ] cartesian-map ;
 
 : hankel-matrix ( n -- matrix )
-    [ iota dup ] keep '[ + abs 1 + dup _ > [ drop 0 ] when ] cartesian-map ;
+    [ <iota> dup ] keep '[ + abs 1 + dup _ > [ drop 0 ] when ] cartesian-map ;
 
 : box-matrix ( r -- matrix )
     2 * 1 + dup '[ _ 1 <array> ] replicate ;
 
 : vandermonde-matrix ( u n -- matrix )
-    iota [ v^n ] with map reverse flip ;
+    <iota> [ v^n ] with map reverse flip ;
 
 :: rotation-matrix3 ( axis theta -- matrix )
     theta cos :> c
@@ -207,10 +207,10 @@ ERROR: negative-power-matrix m n ;
     '[ _ map ] map ; inline
 
 : column-map ( matrix quot -- seq )
-    [ [ first length iota ] keep ] dip '[ _ col @ ] map ; inline
+    [ [ first length <iota> ] keep ] dip '[ _ col @ ] map ; inline
 
 : cartesian-square-indices ( n -- matrix )
-    iota dup cartesian-product ; inline
+    <iota> dup cartesian-product ; inline
 
 : cartesian-matrix-map ( matrix quot -- matrix' )
     [ [ first length cartesian-square-indices ] keep ] dip
@@ -227,17 +227,17 @@ ERROR: negative-power-matrix m n ;
 : sample-cov-matrix ( matrix -- cov ) 1 cov-matrix-ddof ; inline
 
 GENERIC: square-rows ( object -- matrix )
-M: integer square-rows iota square-rows ;
+M: integer square-rows <iota> square-rows ;
 M: sequence square-rows
     [ length ] keep >array '[ _ clone ] { } replicate-as ;
 
 GENERIC: square-cols ( object -- matrix )
-M: integer square-cols iota square-cols ;
+M: integer square-cols <iota> square-cols ;
 M: sequence square-cols
     [ length ] keep [ <array> ] with { } map-as ;
 
 : make-matrix-with-indices ( m n quot -- matrix )
-    [ [ iota ] bi@ ] dip '[ @ ] cartesian-map ; inline
+    [ [ <iota> ] bi@ ] dip '[ @ ] cartesian-map ; inline
 
 : null-matrix? ( matrix -- ? ) empty? ; inline
 
@@ -255,7 +255,7 @@ M: sequence square-cols
     { [ well-formed-matrix? ] [ dim all-eq? ] } 1&& ;
 
 : matrix-coordinates ( dim -- coordinates )
-    first2 [ iota ] bi@ cartesian-product ; inline
+    first2 [ <iota> ] bi@ cartesian-product ; inline
 
 : dimension-range ( matrix -- dim range )
     dim [ matrix-coordinates ] [ first [1,b] ] bi ;
index b2ce6945f2e71aa14aad830885587ae2d41460e5..5312804ff2ac65272e629a696f312e47e8bcb2c3 100644 (file)
@@ -33,7 +33,7 @@ ALIAS: n*p n*v
 
 : p* ( p q -- r )
     2unempty pextend-conv
-    [ drop length [ iota ] keep ]
+    [ drop length [ <iota> ] keep ]
     [ nip <reversed> ]
     [ drop ] 2tri
     '[ _ _ <slice> _ v* sum ] map reverse! ;
@@ -86,7 +86,7 @@ PRIVATE>
     [ V{ 0 } clone V{ 1 } clone ] 2dip swap (pgcd) [ >array ] bi@ ;
 
 : pdiff ( p -- p' )
-    dup length iota v* rest ;
+    dup length <iota> v* rest ;
 
 : polyval ( x p -- p[x] )
     ! Horner scheme
index 7121b6707947e2dbfa6dd3deb85bc93af5fafd2d..29b515fc9fe17f99fa65c3cf561b57b599266c40 100644 (file)
@@ -8,4 +8,4 @@ IN: math.primes.miller-rabin.tests
 { t } [ 37 miller-rabin ] unit-test
 { t } [ 2135623355842621559 miller-rabin ] unit-test
 
-{ f } [ 1000 iota [ drop 15 miller-rabin ] any? ] unit-test
+{ f } [ 1000 <iota> [ drop 15 miller-rabin ] any? ] unit-test
index f46af202496a9ea545307b3036daeb59f3eb42f4..94707c990d04f71d3f7ff32e1f5737ff6289c823 100644 (file)
@@ -10,13 +10,13 @@ IN: math.primes.miller-rabin
     n 1 - :> n-1
     n-1 factor-2s :> ( r s )
     0 :> a!
-    trials iota [
+    trials <iota> [
         drop
         2 n 2 - [a,b] random a!
         a s n ^mod 1 = [
             f
         ] [
-            r iota [
+            r <iota> [
                 2^ s * a swap n ^mod n-1 =
             ] any? not
         ] if
index 8602a3148e9678b949007bd8f6f6da11053f8962..60ce318097298beaeee3c628fc084fdb3ffbca13 100644 (file)
@@ -183,7 +183,7 @@ IN: math.statistics.tests
 
 { { 0 0 0 } } [ { 1 1 1 } standardize ] unit-test
 
-{ { 0 1/4 1/2 3/4 1 } } [ 5 iota rescale ] unit-test
+{ { 0 1/4 1/2 3/4 1 } } [ 5 <iota> rescale ] unit-test
 
 
 {
index cefe886b7234589aea753e5db731cf84b5ad5bda..7f65078fd90b51f35ab437bcd54bd319640f15d9 100644 (file)
@@ -469,7 +469,7 @@ simd-classes [
     [ [ { } ] ] dip
     [ new length shuffles-for ] keep
     '[
-        _ [ [ _ new [ length iota ] keep like 1quotation ] dip '[ _ vshuffle ] ]
+        _ [ [ _ new [ length <iota> ] keep like 1quotation ] dip '[ _ vshuffle ] ]
         [ = ] check-optimizer
     ] unit-test
 ] each
@@ -480,7 +480,7 @@ simd-classes [
     '[
         _ [ [
             _ new
-            [ [ length iota ] keep like ]
+            [ [ length <iota> ] keep like ]
             [ [ length dup dup + [a,b) ] keep like ] bi [ ] 2sequence
         ] dip '[ _ vshuffle2-elements ] ]
         [ = ] check-optimizer
@@ -567,7 +567,7 @@ TUPLE: inconsistent-vector-test bool branch ;
 
 ! Test element access -- it should box bignums for int-4 on x86
 : test-accesses ( seq -- failures )
-    [ length iota dup [ >bignum ] map append ] keep
+    [ length <iota> dup [ >bignum ] map append ] keep
     '[ [ _ 1quotation ] dip '[ _ swap nth ] ] [ = ] check-optimizer ; inline
 
 { { } } [ float-4{ 1.0 2.0 3.0 4.0 } test-accesses ] unit-test
@@ -584,7 +584,7 @@ TUPLE: inconsistent-vector-test bool branch ;
 
 "== Checking broadcast" print
 : test-broadcast ( seq -- failures )
-    [ length iota >array ] keep
+    [ length <iota> >array ] keep
     '[ [ _ 1quotation ] dip '[ _ vbroadcast ] ] [ = ] check-optimizer ;
 
 { { } } [ float-4{ 1.0 2.0 3.0 4.0 } test-broadcast ] unit-test
index 68c161e1f2eb7846ee8fb34598adc7f12b7f95eb..77610111da2935fe4a5539a3b132a771ea22ed6b 100644 (file)
@@ -3,6 +3,6 @@ IN: nibble-arrays.tests
 
 [ -1 <nibble-array> ] [ T{ bad-array-length f -1 } = ] must-fail-with
 
-{ t } [ 16 iota dup >nibble-array sequence= ] unit-test
+{ t } [ 16 <iota> dup >nibble-array sequence= ] unit-test
 { N{ 4 2 1 3 } } [ N{ 3 1 2 4 } reverse ] unit-test
 { N{ 1 4 9 0 9 4 } } [ N{ 1 2 3 4 5 6 } [ sq ] map ] unit-test
index 0a2e9e1645389688752548658d23929bed5c1856..7a0f13a4842e6a26119d1d2851b7011ceafb9ce0 100644 (file)
@@ -18,14 +18,14 @@ vectors math math.order ;
 ] unit-test
 
 { 100 1060 2000 10000 100000 1000000 } [
-    [ t ] swap [ iota dup >persistent-vector sequence= ] curry unit-test
+    [ t ] swap [ <iota> dup >persistent-vector sequence= ] curry unit-test
 ] each
 
 { } [ 10000 [ 16 random-bits ] PV{ } replicate-as "1" set ] unit-test
 { } [ "1" get >vector "2" set ] unit-test
 
 { t } [
-    3000 iota [
+    3000 <iota> [
         drop
         16 random-bits 10000 random
         [ "1" [ new-nth ] change ]
@@ -56,11 +56,11 @@ vectors math math.order ;
 ] unit-test
 
 { t } [
-    10000 iota >persistent-vector 752 [ ppop ] times dup length iota sequence=
+    10000 <iota> >persistent-vector 752 [ ppop ] times dup length iota sequence=
 ] unit-test
 
 { t } [
-    100 iota [
+    100 <iota> [
         drop
         100 random [
             16 random-bits [ "1" [ ppush ] change ] [ "2" get push ] bi
index e3cb186bf8057f5d45f2a13faf59c4c2cd2f43af..4214e67cd0e7e24c5af2f37f2d53019dd7895ea3 100644 (file)
@@ -36,7 +36,7 @@ IN: porter-stemmer
     [ 0 0 ] dip skip-consonants (consonant-seq) ;
 
 : stem-vowel? ( str -- ? )
-    [ length iota ] keep [ consonant? ] curry all? not ;
+    [ length <iota> ] keep [ consonant? ] curry all? not ;
 
 : double-consonant? ( i str -- ? )
     over 1 < [
index 8ba11bdf76ddb9afd085aae5c8a1f5d0c8e1d800..b98acc9374d611fc2873316b9ef0a8cb6eaae6ba 100644 (file)
@@ -457,12 +457,12 @@ TUPLE: fo { a intersection{ integer fixnum } initial: 0 } ;
 ] unit-test
 
 { "{ 0 1 2 3 4 }" } [
-    [ 5 length-limit [ 5 iota >array pprint ] with-variable ]
+    [ 5 length-limit [ 5 <iota> >array pprint ] with-variable ]
     with-string-writer
 ] unit-test
 
 { "{ 0 1 2 3 ~2 more~ }" } [
-    [ 5 length-limit [ 6 iota >array pprint ] with-variable ]
+    [ 5 length-limit [ 6 <iota> >array pprint ] with-variable ]
     with-string-writer
 ] unit-test
 
index 8a37a6b72079869110a6a01326a2b3cea8cfb193..6ad8f49df051ef18b31bdb625f760c317301ef08 100644 (file)
@@ -325,7 +325,7 @@ SYMBOL: next
 
 : group-flow ( seq -- newseq )
     [
-        dup length iota [
+        dup length <iota> [
             2dup 1 - swap ?nth prev namespaces:set
             2dup 1 + swap ?nth next namespaces:set
             swap nth dup split-before dup , split-after
index 2c1d6d53b8671730e263d288c713b5d3661f8efc..8ab979019bd8f7f384758082635392ebbd1840f7 100644 (file)
@@ -11,8 +11,8 @@ IN: random.tests
 { 2 } [ V{ 10 20 30 } [ delete-random drop ] keep length ] unit-test
 [ V{ } [ delete-random drop ] keep length ] must-fail
 
-{ t } [ 10000 [ iota 0 [ drop 187 random + ] reduce ] keep / 2 * 187 10 ~ ] unit-test
-{ t } [ 10000 [ iota 0 [ drop 400 random + ] reduce ] keep / 2 * 400 10 ~ ] unit-test
+{ t } [ 10000 [ <iota> 0 [ drop 187 random + ] reduce ] keep / 2 * 187 10 ~ ] unit-test
+{ t } [ 10000 [ <iota> 0 [ drop 400 random + ] reduce ] keep / 2 * 400 10 ~ ] unit-test
 
 { t } [ 1000 [ 400 random ] replicate members length 256 > ] unit-test
 
@@ -29,7 +29,7 @@ IN: random.tests
 [ { 1 2 } 3 sample ] [ too-many-samples?  ] must-fail-with
 
 { 3 } [ { 1 2 3 4 } 3 sample members length ] unit-test
-{ 99 } [ 100 iota 99 sample members length ] unit-test
+{ 99 } [ 100 <iota> 99 sample members length ] unit-test
 
 { }
 [ [ 100 random-bytes ] with-system-random drop ] unit-test
index 37e05bb6aa53ff3bc9ab1e92472b44448fe57f9d..cbc9e6dc0b91edc516fdd05d48a6ba1bb106f065 100644 (file)
@@ -128,7 +128,7 @@ ERROR: too-many-samples seq n ;
 
 : sample ( seq n -- seq' )
     2dup [ length ] dip < [ too-many-samples ] when
-    [ [ length iota >array ] dip [ randomize-n-last ] keep tail-slice* ]
+    [ [ length <iota> >array ] dip [ randomize-n-last ] keep tail-slice* ]
     [ drop ] 2bi nths-unsafe ;
 
 : delete-random ( seq -- elt )
index 6e9605f220709561c3c7a37d5bf8066b69ecd5b3..f4a50cde72d13d28b11423d42c16173ba6431d51 100644 (file)
@@ -66,7 +66,7 @@ M:: sfmt generate ( sfmt -- )
     state n>> :> n
     state mask>> :> mask
 
-    n m - >fixnum iota [| i |
+    n m - >fixnum <iota> [| i |
         i array nth-unsafe
         i m + array nth-unsafe
         mask state r1>> state r2>> formula :> r
@@ -77,7 +77,7 @@ M:: sfmt generate ( sfmt -- )
     ] each
 
     ! n m - 1 + n [a,b) [
-    m 1 - iota [
+    m 1 - <iota> [
         n m - 1 + + >fixnum :> i
         i array nth-unsafe
         m n - i + array nth-unsafe
index cb5eb954ee8d0f7a9f9d5900918f350ec1c275d2..4b952a7d1c47d1323633a0a2da13ca40aeb50c3d 100644 (file)
@@ -11,7 +11,7 @@ TUPLE: parts in out ;
     zip [ first ] partition [ values ] bi@ parts boa ;
 
 : powerset-partition ( sequence -- partitions )
-    [ length [ 2^ iota ] keep ] keep '[ _ <bits> _ make-partition ] map rest ;
+    [ length [ 2^ <iota> ] keep ] keep '[ _ <bits> _ make-partition ] map rest ;
 
 : partition>class ( parts -- class )
     [ out>> [ <not-class> ] map ]
index d0feb06063598015d1e299c1cf8ebf47ae767d88..e15796c9b5825bbce7eee4a7d3755190a8733c2f 100644 (file)
@@ -22,7 +22,7 @@ MACRO: firstn ( n -- quot )
 
 MACRO: set-firstn-unsafe ( n -- quot )
     [ 1 + ]
-    [ iota [ '[ _ rot [ set-nth-unsafe ] keep ] ] map ] bi
+    [ <iota> [ '[ _ rot [ set-nth-unsafe ] keep ] ] map ] bi
     '[ _ -nrot _ spread drop ] ;
 
 MACRO: set-firstn ( n -- quot )
index ad28dde00dd0715fd98169dfa271a706e54f2e94..2353dcbe96bf98515cc5ca54e415a8602c874a06 100644 (file)
@@ -9,7 +9,7 @@ IN: sequences.unrolled
     swap '[ _ call( i -- ) ] each-integer ;
 
 << \ (unrolled-each-integer) [
-    iota [ '[ _ swap call( i -- ) ] ] [ ] map-as '[ _ cleave ]
+    <iota> [ '[ _ swap call( i -- ) ] ] [ ] map-as '[ _ cleave ]
 ] 1 define-partial-eval >>
 
 : (unrolled-collect) ( quot into -- quot' )
@@ -95,4 +95,4 @@ PRIVATE>
     4 npick unrolled-2map-as ; inline
 
 : unrolled-map-index ( seq len quot: ( x i -- newx ) -- newseq )
-    [ dup length iota ] 2dip unrolled-2map ; inline
+    [ dup length <iota> ] 2dip unrolled-2map ; inline
index 9dc02de976d65ad1f8ce188ec405a70620acec9c..1be89a4e6d4fde73bd6b017abd6efde7fbbb7c5a 100644 (file)
@@ -107,7 +107,7 @@ ARTICLE: "specialized-array-examples" "Specialized array examples"
 { $code "1.0 [ sin ] [ cos ] [ tan ] tri float-array{ } 3sequence ." }
 "Create a float array and sum the elements:"
 { $code
-    "1000 iota [ 1000 /f pi * sin ] float-array{ } map-as"
+    "1000 <iota> [ 1000 /f pi * sin ] float-array{ } map-as"
     "0.0 [ + ] reduce ."
 } ;
 
index 5426b773b24ff0c12e305e15d3f5fbea08e02063..93a3957dc348efaa79559fbc6a71c8250134e0e0 100644 (file)
@@ -459,7 +459,7 @@ DEFER: eee'
     ] [ 4drop ] if ; inline recursive
 : recursive-reduce ( seq i quot: ( prev elt -- next ) -- result )
     swapd [ 0 ] 2dip over length (recursive-reduce) ; inline
-{ 24995000 } [ 10000 iota 0 [ dup even? [ + ] [ drop ] if ] recursive-reduce ] unit-test
+{ 24995000 } [ 10000 <iota> 0 [ dup even? [ + ] [ drop ] if ] recursive-reduce ] unit-test
 { 3 1 } [ [ member? [ 1 + ] when ] curry recursive-reduce ] must-infer-as
 
 [ [ [ write write ] each      ] infer ] [ unbalanced-branches-error? ] must-fail-with
index 92c3fa2921c91d918ede47e5c4895d2e059177a5..a5200f77d3128110eb472d67868b2afe7cf01ffa 100644 (file)
@@ -7,7 +7,7 @@ IN: suffix-arrays
 <PRIVATE
 
 : suffixes ( string -- suffixes-seq )
-    dup length iota [ tail-slice ] with map ;
+    dup length <iota> [ tail-slice ] with map ;
 
 : prefix<=> ( begin seq -- <=> )
     [ <=> ] [ swap head? ] 2bi [ drop +eq+ ] when ;
index 94e03064d6082541818e056b5ff672648334b36e..43b7e8e61a014d966933a272cec181bb6b1bb066 100644 (file)
@@ -184,7 +184,7 @@ $nl
     ! Don't use $example below: it won't pass help-lint.
     { $code
       "USING: math.parser threads ;"
-      "[ 10 iota [ number>string write nl yield ] each ] \"test\" spawn drop"
+      "[ 10 <iota> [ number>string write nl yield ] each ] \"test\" spawn drop"
       "10 [ yield ] times"
       "0"
       "1"
index 6cbe48605ffe932c7ce824ac9715aefaf7e37d66..5d9ef155f2f38be13e993e3e67496628102f0ed2 100644 (file)
@@ -44,7 +44,7 @@ yield
 { f } [ f get-global ] unit-test
 
 { { 0 3 6 9 12 15 18 21 24 27 } } [
-    10 iota [
+    10 <iota> [
         0 "i" tset
         [
             "i" [ yield 3 + ] tchange
index e656597a38f4d3c6392c2deab3eeebec4d40aec4..aa706c8b9d5d35ca468a4dcea1583fc4b63954be 100755 (executable)
@@ -47,7 +47,7 @@ STRUCT: group-directory-entry
     ico-header heap-size bytes <displaced-alien>
     header ImageCount>> ico-directory-entry <c-direct-array> :> directory
 
-    directory dup length iota [ ico>group-directory-entry ] { } 2map-as
+    directory dup length <iota> [ ico>group-directory-entry ] { } 2map-as
         :> group-directory
     directory [ bytes ico-icon ] { } map-as :> icon-bytes
 
index 845462132fd03422c3546a5841cebf2be0e33b21..ff1cb85bc0eca38f34154689c05327a3fb9f73fa 100644 (file)
@@ -4,7 +4,7 @@ IN: tools.hexdump.tests
 { t } [ B{ } hexdump "Length: 0, 0h\n" = ] unit-test
 { t } [ "abcdefghijklmnopqrstuvwxyz" >byte-array hexdump "Length: 26, 1ah\n00000000h: 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop\n00000010h: 71 72 73 74 75 76 77 78 79 7a                   qrstuvwxyz\n" = ] unit-test
 
-{ t } [ 256 iota [ ] B{ } map-as hexdump "Length: 256, 100h\n00000000h: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\n00000010h: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................\n00000020h: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f  !\"#$%&'()*+,-./\n00000030h: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?\n00000040h: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @ABCDEFGHIJKLMNO\n00000050h: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\\]^_\n00000060h: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f `abcdefghijklmno\n00000070h: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~.\n00000080h: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ................\n00000090h: 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ................\n000000a0h: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................\n000000b0h: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf ................\n000000c0h: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf ................\n000000d0h: d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df ................\n000000e0h: e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ................\n000000f0h: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff ................\n" = ] unit-test
+{ t } [ 256 <iota> [ ] B{ } map-as hexdump "Length: 256, 100h\n00000000h: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\n00000010h: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................\n00000020h: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f  !\"#$%&'()*+,-./\n00000030h: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?\n00000040h: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @ABCDEFGHIJKLMNO\n00000050h: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\\]^_\n00000060h: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f `abcdefghijklmno\n00000070h: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~.\n00000080h: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ................\n00000090h: 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ................\n000000a0h: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................\n000000b0h: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf ................\n000000c0h: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf ................\n000000d0h: d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df ................\n000000e0h: e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ................\n000000f0h: f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff ................\n" = ] unit-test
 
 
 {
index ac5cd5fd6fb57b3e9248a8be47b6b5dbdba1e6b2..58ebf0cddf2ef11e6f9c28604ee865b514c2b275 100644 (file)
@@ -17,8 +17,8 @@ TUPLE: boom ;
 { } [ 10 [ [ 100 [ 1000 random (byte-array) drop ] times compact-gc ] profile ] times ] unit-test
 { } [ 2 [ [ 1 seconds sleep ] profile ] times ] unit-test
 
-{ } [ [ 300,000 iota [ sq sq sq ] map drop ] profile flat profile. ] unit-test
-{ } [ [ 300,000 iota [ sq sq sq ] map drop ] profile top-down profile. ] unit-test
+{ } [ [ 300,000 <iota> [ sq sq sq ] map drop ] profile flat profile. ] unit-test
+{ } [ [ 300,000 <iota> [ sq sq sq ] map drop ] profile top-down profile. ] unit-test
 
 f raw-profile-data set-global
 gc
index ce96a0cab8fc3ded4c0e287e81cd9ac411cea37a..014fc1be20315b6e5e81fe4feb71999a5c6cae55 100644 (file)
@@ -21,11 +21,11 @@ IN: tools.scaffold.tests
 ] unit-test
 
 {
-"HELP: iota-tuple
+"HELP: iota
 { $class-description \"\" } ;
 " }
 [
-    [ \ iota-tuple (help.) ] with-string-writer
+    [ \ iota (help.) ] with-string-writer
 ] unit-test
 
 { sequence t } [ "seq" lookup-type ] unit-test
index b937b25b932357e5981928c395241b10680106b9..2de706bb14fec64aa27a2bfc77d7058b40d7c6d2 100644 (file)
@@ -18,7 +18,7 @@ M: bad-tr summary
     [ [ ascii? ] all? ] both? [ bad-tr ] unless ;
 
 : compute-tr ( quot from to -- mapping )
-    [ 128 iota ] 3dip zip
+    [ 128 <iota> ] 3dip zip
     '[ [ _ call( x -- y ) _ at ] keep or ] B{ } map-as ; inline
 
 : tr-hints ( word -- )
index 40cd416297dce72e28c1907bc0c2225d0b59c2b1..1ed3c867265a9ecb5cb1d97ca658dc7e4ca6363c 100644 (file)
@@ -22,7 +22,7 @@ MACRO: boa-unsafe ( class -- quot ) tuple-layout '[ _ <tuple-boa> ] ;
 
 MACRO: write-tuple ( class -- quot )
     [ '[ [ _ boa ] undo ] ]
-    [ tuple-arity iota <reversed> [ '[ [ _ ] dip set-nth-unsafe ] ] map '[ _ cleave ] ]
+    [ tuple-arity <iota> <reversed> [ '[ [ _ ] dip set-nth-unsafe ] ] map '[ _ cleave ] ]
     bi '[ _ dip @ ] ;
 
 : check-final ( class -- )
index 9d97ff256877adf9c7dca384ae093428115899c4..d3a32b59e4ab69f3ccc1f3ab87f69d08265767cc 100644 (file)
@@ -163,7 +163,7 @@ ui-running? [
         <flag> ui-notify-flag set-global
 
         [ fake-ui-loop ] "Fake UI" spawn drop
-        8001 iota [ layout-later ] each
+        8001 <iota> [ layout-later ] each
         ui-notify-flag get-global value>>
         layout-queue delete-all
     ] unit-test
index 35df5030f3707fb4ae24734ae8a5adb68a6fe820..a8f209bc648bdaeab0a1f068615826cc74af63fd 100644 (file)
@@ -70,7 +70,7 @@ dup layout
 "s" set
 
 { t } [
-    10 iota [
+    10 <iota> [
         drop
         "g2" get scroll>gadget
         "s" get layout
index 277ebc564fa411ad834e4b32b982d259a9a2c306..aa916448958496638d3e26dc8612b426830181e5 100644 (file)
@@ -16,7 +16,7 @@ TUPLE: gradient < caching-pen colors last-vertices last-colors ;
 
 :: gradient-vertices ( direction dim colors -- seq )
     direction dim v* dim over v- swap
-    colors length [ iota ] [ 1 - ] bi v/n [ v*n ] with map
+    colors length [ <iota> ] [ 1 - ] bi v/n [ v*n ] with map
     swap [ over v+ 2array ] curry map
     concat concat float >c-array ;
 
index 11bc5eac66a92025183a4590031614fbc6dd3707..d7dcd604c37f3812279f2f61f91703c93f28918d 100644 (file)
@@ -51,4 +51,4 @@ IN: unicode.breaks.tests
 grapheme-break-test parse-test-file [ >graphemes ] test
 word-break-test parse-test-file [ >words ] test
 
-{ { t f t t f t } } [ 6 iota [ "as df" word-break-at? ] map ] unit-test
+{ { t f t t f t } } [ 6 <iota> [ "as df" word-break-at? ] map ] unit-test
index 1aa5ec3000059ea6591c5dbc870aa47cf9e53de3..a032096b6f5f9eeec11f4078432507695a9b175e 100644 (file)
@@ -84,14 +84,14 @@ SYMBOL: table
 
 : make-grapheme-table ( -- )
     { CR } { LF } connect
-    { Control CR LF } graphemes iota disconnect
-    graphemes iota { Control CR LF } disconnect
+    { Control CR LF } graphemes <iota> disconnect
+    graphemes <iota> { Control CR LF } disconnect
     { L } { L V LV LVT } connect
     { LV V } { V T } connect
     { LVT T } { T } connect
-    graphemes iota { Extend } connect
-    graphemes iota { SpacingMark } connect
-    { Prepend } graphemes iota connect ;
+    graphemes <iota> { Extend } connect
+    graphemes <iota> { SpacingMark } connect
+    { Prepend } graphemes <iota> connect ;
 
 "grapheme-table" create-word-in
 graphemes init-table table
@@ -146,8 +146,8 @@ SYMBOL: check-number-after
 
 : make-word-table ( -- )
     { wCR } { wLF } connect
-    { wNewline wCR wLF } unicode-words iota disconnect
-    unicode-words iota { wNewline wCR wLF } disconnect
+    { wNewline wCR wLF } unicode-words <iota> disconnect
+    unicode-words <iota> { wNewline wCR wLF } disconnect
     { wALetter } { wMidLetter wMidNumLet } check-letter-after set-table
     { wMidLetter wMidNumLet } { wALetter } check-letter-before set-table
     { wNumeric wALetter } { wNumeric wALetter } connect
index 36ac433b6a31d5d89c2993e6f1222b48c45a2de3..92f827d07773bbbaf1b544d92a261cfb043f5dba 100644 (file)
@@ -83,7 +83,7 @@ ducet get-global insert-helpers
 
 : add ( char -- )
     dup blocked? [ 1string , ] [
-        dup possible-bases dup length iota
+        dup possible-bases dup length <iota>
         [ ?combine ] 2with any?
         [ drop ] [ 1string , ] if
     ] if ;
index 5e5a8cea36e58fd970105d9ffd8285a326ba0084..ba478a841cc006409fd3b75fef63ee65910f7ec6 100644 (file)
@@ -100,7 +100,7 @@ PRIVATE>
     over tail-slice first-word + ;
 
 : last-word ( str -- i )
-    [ length iota ] keep '[ _ word-break-at? ] find-last drop 0 or ;
+    [ length <iota> ] keep '[ _ word-break-at? ] find-last drop 0 or ;
 
 : last-word-from ( end str -- i )
     swap head-slice last-word ;
index 968b52fbe49730285c7962f7f994edbe6de6d389..465d617a3d209a79ab02f0a0f8b70139c6058cfe 100644 (file)
@@ -98,7 +98,7 @@ TUPLE: registry-enum-key ;
 
 
 :: reg-enum-keys ( registry-info -- seq )
-    registry-info sub-keys>> iota [
+    registry-info sub-keys>> <iota> [
         [ registry-info key>> ] dip
         registry-value-max-length TCHAR <c-array> dup :> registry-value
         registry-value length dup :> registry-value-length
index 9200547144ea1674fdee37d8b1de81eaaa91f66d..c56edcc671cdc70a5b57dd023dca1f122a6e0ace 100644 (file)
@@ -315,5 +315,5 @@ unit-test
         { 2 V{ 2 5 8 } }
     }
 } [
-    10 iota [ 3 mod ] collect-by
+    10 <iota> [ 3 mod ] collect-by
 ] unit-test
index 88d5021cc0df91cbad8ab9537349d38257291489..3f4b3b890cee2dac285e2273839219b560d6cb50 100644 (file)
@@ -231,7 +231,7 @@ M: assoc value-at* swap [ = nip ] curry assoc-find nip ;
      { } zip-as ; inline
 
 : zip-index-as ( values exemplar -- assoc )
-    [ dup length iota ] dip zip-as ; inline
+    [ dup length <iota> ] dip zip-as ; inline
 
 : zip-index ( values -- alist )
     { } zip-index-as ; inline
@@ -295,7 +295,7 @@ M: enum delete-at seq>> remove-nth! drop ; inline
 
 M: enum >alist ( enum -- alist ) ; inline
 
-M: enum keys seq>> length iota >array ; inline
+M: enum keys seq>> length <iota> >array ; inline
 
 M: enum values seq>> >array ; inline
 
index da3df72974b1255b3ace70009fb5c17283d0d160..f6f6870041649d54e588e64c2c9aa19c5b0ff881 100644 (file)
@@ -8,7 +8,7 @@ CONSTANT: crc32-polynomial 0xedb88320
 
 CONSTANT: crc32-table V{ }
 
-256 iota [
+256 <iota> [
     8 [
         [ 2/ ] [ even? ] bi [ crc32-polynomial bitxor ] unless
     ] times
index 9c84375ceb01401b4ad1e45eddc7dd0b30e1a155..f903d0088bb729e10f7081f1bf4a6f3cfc85fc43 100644 (file)
@@ -64,7 +64,7 @@ M: tuple class-of layout-of 2 slot { word } declare ; inline
     dup tuple? [ not-a-tuple ] unless ; inline
 
 : prepare-tuple-slots ( tuple -- n tuple )
-    check-tuple [ tuple-size iota ] keep ;
+    check-tuple [ tuple-size <iota> ] keep ;
 
 : copy-tuple-slots ( n tuple -- array )
     [ array-nth ] curry map ;
@@ -98,7 +98,7 @@ GENERIC: slots>tuple ( seq class -- tuple )
 M: tuple-class slots>tuple ( seq class -- tuple )
     check-slots pad-slots
     tuple-layout <tuple> [
-        [ tuple-size iota ]
+        [ tuple-size <iota> ]
         [ [ set-array-nth ] curry ]
         bi 2each
     ] keep ;
@@ -372,7 +372,7 @@ M: tuple equal? over tuple? [ tuple= ] [ 2drop f ] if ;
     [
         [ drop 1000003 ] dip
         [ class-of hashcode ] [ tuple-size ] bi
-        [ dup fixnum+fast 82520 fixnum+fast ] [ iota ] bi
+        [ dup fixnum+fast 82520 fixnum+fast ] [ <iota> ] bi
     ] 2keep [
         swapd array-nth hashcode* >fixnum rot fixnum-bitxor
         pick fixnum*fast [ [ fixnum+fast ] keep ] dip swap
index f348155d3698760797698f8c7103192ade30f759..abfea4300123abc63afcf3f27d14a5ecc541b23c 100644 (file)
@@ -137,7 +137,7 @@ ERROR: no-case object ;
     ] if ;
 
 : <buckets> ( initial length -- array )
-    next-power-of-2 iota swap [ nip clone ] curry map ;
+    next-power-of-2 <iota> swap [ nip clone ] curry map ;
 
 : distribute-buckets ( alist initial quot -- buckets )
     swapd [ [ dup first ] dip call 2array ] curry map
@@ -202,7 +202,7 @@ M: reversed hashcode* [ sequence-hashcode ] recursive-hashcode ;
 
 M: slice hashcode* [ sequence-hashcode ] recursive-hashcode ;
 
-M: iota-tuple hashcode*
+M: iota hashcode*
     over 0 <= [ 2drop 0 ] [
         nip length 0 swap [ sequence-hashcode-step ] each-integer
     ] if ;
index c6acfdda62677ced709eca76b590e5477b824abf..5b8153deb4a4adfbf2b1686a6ed18ddc6c83300a 100644 (file)
@@ -22,7 +22,7 @@ IN: continuations.tests
         ] with-variables
     ] callcc0 "x" get 5 = ;
 
-{ t } [ 10 callcc1-test 10 iota reverse >vector = ] unit-test
+{ t } [ 10 callcc1-test 10 <iota> reverse >vector = ] unit-test
 { t } [ callcc-namespace-test ] unit-test
 
 [ 5 throw ] [ 5 = ] must-fail-with
index d9a2b9c17b3ebcf24ca53b57be8e4182521b1b4f..e56adb2a44b66271e4e4e5ee7100833e24c3492c 100644 (file)
@@ -51,7 +51,7 @@ sets sorting tools.test ;
 
 ! make sure growth and capacity use same load-factor
 { t } [
-    100 iota
+    100 <iota>
     [ [ <hash-set> ] map ]
     [ [ HS{ } clone [ '[ _ adjoin ] each-integer ] keep ] map ] bi
     [ [ array>> length ] bi@ = ] 2all?
index a238eef90dbd1192701f929c256da38b9f51fa06..ec51435eec1836278eef5dea327ddf8ac8881be7 100644 (file)
@@ -3,10 +3,10 @@ math namespaces sequences tools.test ;
 
 { H{ } } [ { } [ dup ] H{ } map>assoc ] unit-test
 
-{ } [ 1000 iota [ dup sq ] H{ } map>assoc "testhash" set ] unit-test
+{ } [ 1000 <iota> [ dup sq ] H{ } map>assoc "testhash" set ] unit-test
 
 { V{ } }
-[ 1000 iota [ dup sq swap "testhash" get at = ] reject ]
+[ 1000 <iota> [ dup sq swap "testhash" get at = ] reject ]
 unit-test
 
 { t }
@@ -141,7 +141,7 @@ H{ } "x" set
 
 ! make sure growth and capacity use same load-factor
 { t } [
-    100 iota
+    100 <iota>
     [ [ <hashtable> ] map ]
     [ [ H{ } clone [ '[ dup _ set-at ] each-integer ] keep ] map ] bi
     [ [ array>> length ] bi@ = ] 2all?
@@ -183,4 +183,4 @@ H{ } "x" set
 { 1 } [ 2 "h" get at ] unit-test
 
 ! Random test case
-{ "A" } [ 100 iota [ dup ] H{ } map>assoc 32 over delete-at "A" 32 pick set-at 32 of ] unit-test
+{ "A" } [ 100 <iota> [ dup ] H{ } map>assoc 32 over delete-at "A" 32 pick set-at 32 of ] unit-test
index d69ddb0d779b14455a2a421b1f1f610df19e7fab..b85e9316e37b9a3ee81397f78f73a04b1a4b068c 100644 (file)
@@ -18,9 +18,9 @@ IN: io.binary
 
 PRIVATE>
 
-: >le ( x n -- byte-array ) iota map-bytes ;
+: >le ( x n -- byte-array ) <iota> map-bytes ;
 
-: >be ( x n -- byte-array ) iota <reversed> map-bytes ;
+: >be ( x n -- byte-array ) <iota> <reversed> map-bytes ;
 
 : d>w/w ( d -- w1 w2 )
     [ 0xffffffff bitand ] [ -32 shift 0xffffffff bitand ] bi ;
index b18db487b2829041f62a5e4018e75629ffb08a14..bce99cbcca734a89843f6a475ee64fba50720ea8 100644 (file)
@@ -106,7 +106,7 @@ M: utf16le encode-char ( char stream encoding -- )
     set-nth-unsafe ; inline
 
 : ascii-string>utf16-byte-array ( off string -- byte-array )
-    [ length >fixnum [ iota ] [ 2 fixnum*fast <byte-array> ] bi ] keep
+    [ length >fixnum [ <iota> ] [ 2 fixnum*fast <byte-array> ] bi ] keep
     [ [ ascii-char>utf16-byte-array ] 2curry with each ] 2keep drop ; inline
 
 : ascii-string>utf16le ( string stream -- )
index efeeb708d01be9ec5b597a143b490606ed4f2389..f6ee250173d6ccde7c818a477690f91c39d0dfdf 100644 (file)
@@ -26,7 +26,7 @@ IN: io.encodings.utf8.tests
 
 { 3 } [ 2 "lápis" >utf8-index ] unit-test
 
-{ V{ } } [ 100000 iota [ [ code-point-length ] [ 1string utf8 encode length ] bi = ] reject ] unit-test
+{ V{ } } [ 100000 <iota> [ [ code-point-length ] [ 1string utf8 encode length ] bi = ] reject ] unit-test
 
 { { CHAR: replacement-character } } [ { 0b110,00000 0b10,000000 } decode-utf8-w/stream ] unit-test
 { { CHAR: replacement-character } } [ { 0b110,00001 0b10,111111 } decode-utf8-w/stream ] unit-test
index f3c57776af4f71dcda51049fd75e5c322fb62d03..f37a851e039815f147919d2dfb66ca2fa5ac1a66 100644 (file)
@@ -810,7 +810,7 @@ HELP: with
 { $notes "This operation is efficient and does not copy the quotation." }
 { $examples
     { $example "USING: kernel math prettyprint sequences ;" "1 { 1 2 3 } [ / ] with map ." "{ 1 1/2 1/3 }" }
-    { $example "USING: kernel math prettyprint sequences ;" "1000 100 5 iota [ sq + + ] 2with map ." "{ 1100 1101 1104 1109 1116 }" }
+    { $example "USING: kernel math prettyprint sequences ;" "1000 100 5 <iota> [ sq + + ] 2with map ." "{ 1100 1101 1104 1109 1116 }" }
 } ;
 
 HELP: 2with
index f5c19123ab5f8eca9cdb972a7580d58907b33661..23f12b419dc11730d0954aba9fdae3208e3b8208 100644 (file)
@@ -20,7 +20,7 @@ IN: kernel.tests
         { 1 2 8 }
         { 1 2 9 }
     }
-} [ 1 2 10 iota [ 3array ] 2with map ] unit-test
+} [ 1 2 10 <iota> [ 3array ] 2with map ] unit-test
 
 ! Don't leak extra roots if error is thrown
 { } [ 1000 [ [ 3 throw ] ignore-errors ] times ] unit-test
index 8350a297b528f0c91fea4fa3ef74a0d560f27363..ff48b47f899434450fe7a4554d24f2ab5f7d6ac3 100644 (file)
@@ -57,7 +57,7 @@ unit-test
 
 { 0 } [ 1/0. >bignum ] unit-test
 
-{ t } [ 64 iota [ 2^ 0.5 * ] map [ < ] monotonic? ] unit-test
+{ t } [ 64 <iota> [ 2^ 0.5 * ] map [ < ] monotonic? ] unit-test
 
 { 5 } [ 10.5 1.9 /i ] unit-test
 
index 4e858f3b39076f78be6d833d9a09f3efed53ce41..1a3b8f1111d0b40f450e7753c0305518f7deb93e 100644 (file)
@@ -110,7 +110,7 @@ TUPLE: tup2 a b c d ;
     drop 2097103 <byte-array> ;
 
 : outer ( -- lag )
-    9 iota [ inner ] map
+    9 <iota> [ inner ] map
     ! D 0 is scrubbed, but if the branch calling 'inner' was
     ! called, then both D 0 and D 1 should have been scrubbed.
     0 9 1 tup2 boa ;
index 1f827ea23624af02c7a5dfb831dfbc861ebe6664..c2ee4171f740cab881a84ee4120d17bcf53a2303 100644 (file)
@@ -20,7 +20,7 @@ sequences.private strings tools.test ;
 
 { fixnum } [ 1 >bignum SBUF" " new-sequence length class-of ] unit-test
 
-{ fixnum } [ 1 >bignum iota [ ] SBUF" " map-as length class-of ] unit-test
+{ fixnum } [ 1 >bignum <iota> [ ] SBUF" " map-as length class-of ] unit-test
 
 [ 1.5 SBUF" " new-sequence ] must-fail
 
index 8d70f695bf852e2999c0c25b4b0547ea1e3399b8..c8bd6778c86f3985e510d6cdcbced2d2b588987b 100644 (file)
@@ -1249,7 +1249,7 @@ HELP: selector
 { $description "Creates a new vector to accumulate the values which return true for a predicate. Returns a new quotation which accepts an object to be tested and stored in the collector if the test yields true. The collector is left on the stack for convenience." }
 { $examples
     { $example "! Find all the even numbers:" "USING: prettyprint sequences math kernel ;"
-               "10 iota [ even? ] selector [ each ] dip ."
+               "10 <iota> [ even? ] selector [ each ] dip ."
                "V{ 0 2 4 6 8 }"
     }
 }
@@ -1485,7 +1485,7 @@ HELP: binary-reduce
 { $description "Like " { $link reduce } ", but splits the sequence in half recursively until each sequence is small enough, and calls the quotation on these smaller sequences. If the quotation computes values that depend on the size of their input, such as bignum arithmetic, then this algorithm can be more efficient than using " { $link reduce } "." }
 { $examples "Computing factorial:"
     { $example "USING: prettyprint sequences math ;"
-    "40 iota rest-slice 1 [ * ] binary-reduce ."
+    "40 <iota> rest-slice 1 [ * ] binary-reduce ."
     "20397882081197443358640281739902897356800000000" }
 } ;
 
@@ -1583,13 +1583,13 @@ HELP: shorten
     "V{ 1 2 3 }"
 } } ;
 
-HELP: iota
+HELP: <iota>
 { $values { "n" integer } { "iota" iota } }
 { $description "Creates an immutable virtual sequence containing the integers from 0 to " { $snippet "n-1" } "." }
 { $examples
   { $example
     "USING: math sequences prettyprint ;"
-    "3 iota [ sq ] map ."
+    "3 <iota> [ sq ] map ."
     "{ 0 1 4 }"
   }
 } ;
@@ -1676,12 +1676,12 @@ $nl
 
 ARTICLE: "sequences-integers" "Counted loops"
 "A virtual sequence is defined for iterating over integers from zero."
-{ $subsection iota }
-"For example, calling " { $link iota } " on the integer 3 produces a sequence containing the elements 0, 1, and 2. This is very useful for performing counted loops using words such as " { $link each } ":"
-{ $example "USING: sequences prettyprint ; 3 iota [ . ] each" "0\n1\n2" }
+{ $subsection <iota> }
+"For example, calling " { $link <iota> } " on the integer 3 produces a sequence containing the elements 0, 1, and 2. This is very useful for performing counted loops using words such as " { $link each } ":"
+{ $example "USING: sequences prettyprint ; 3 <iota> [ . ] each" "0\n1\n2" }
 "A common idiom is to iterate over a sequence, while also maintaining a loop counter. This can be done using " { $link each-index } ", " { $link map-index } " and " { $link reduce-index } "."
 $nl
-"Combinators that produce new sequences, such as " { $link map } ", will output an array if the input is an instance of " { $link iota } "."
+"Combinators that produce new sequences, such as " { $link map } ", will output an array if the input is an instance of " { $link <iota> } "."
 $nl
 "More elaborate counted loops can be performed with " { $link "math.ranges" } "." ;
 
index a91bf4e1007b940da8b2f984268a2d420e14bf11..72a326aaab5089394102d87c25865deb1b8bdc1d 100644 (file)
@@ -6,13 +6,13 @@ IN: sequences.tests
 { "empty" } [ { } [ "empty" ] [ "not empty" ] if-empty ] unit-test
 { { 1 } "not empty" } [ { 1 } [ "empty" ] [ "not empty" ] if-empty ] unit-test
 
-{ V{ 1 2 3 4 } } [ 1 5 dup iota <slice> >vector ] unit-test
-{ 3 } [ 1 4 dup iota <slice> length ] unit-test
+{ V{ 1 2 3 4 } } [ 1 5 dup <iota> <slice> >vector ] unit-test
+{ 3 } [ 1 4 dup <iota> <slice> length ] unit-test
 { 2 } [ 1 3 { 1 2 3 4 } <slice> length ] unit-test
 { V{ 2 3 } } [ 1 3 { 1 2 3 4 } <slice> >vector ] unit-test
 { V{ 4 5 } } [ { 1 2 3 4 5 } 2 tail-slice* >vector ] unit-test
-{ V{ 3 4 } } [ 2 4 1 10 dup iota <slice> subseq >vector ] unit-test
-{ V{ 3 4 } } [ 0 2 2 4 1 10 dup iota <slice> <slice> subseq >vector ] unit-test
+{ V{ 3 4 } } [ 2 4 1 10 dup <iota> <slice> subseq >vector ] unit-test
+{ V{ 3 4 } } [ 0 2 2 4 1 10 dup <iota> <slice> <slice> subseq >vector ] unit-test
 [ 0 10 "hello" <slice> ] must-fail
 [ -10 3 "hello" <slice> ] must-fail
 [ 2 1 "hello" <slice> ] must-fail
@@ -129,7 +129,7 @@ IN: sequences.tests
 { t } [ B{ 0 } { 1 } append byte-array? ] unit-test
 { t } [ B{ 0 } { 1 } prepend byte-array? ] unit-test
 
-{ "0123456789" } [ 58 iota [ 48 < ] "" reject-as ] unit-test
+{ "0123456789" } [ 58 <iota> [ 48 < ] "" reject-as ] unit-test
 
 { [ ]       } [ 1 [ ]           remove ] unit-test
 { [ ]       } [ 1 [ 1 ]         remove ] unit-test
@@ -166,7 +166,7 @@ IN: sequences.tests
 [ 4 [ CHAR: a <string> ] { } map-integers ]
 unit-test
 
-{ V{ 1 3 5 7 9 } } [ 10 iota >vector [ even? ] reject! ] unit-test
+{ V{ 1 3 5 7 9 } } [ 10 <iota> >vector [ even? ] reject! ] unit-test
 
 { V{ } } [ "f" V{ } clone remove! ] unit-test
 { V{ } } [ "f" V{ "f" } clone remove! ] unit-test
@@ -174,11 +174,11 @@ unit-test
 { V{ "x" } } [ "f" V{ "f" "x" "f" } clone remove! ] unit-test
 { V{ "y" "x" } } [ "f" V{ "y" "f" "x" "f" } clone remove! ] unit-test
 
-{ V{ 0 1 4 5 } } [ 6 iota >vector 2 4 pick delete-slice ] unit-test
+{ V{ 0 1 4 5 } } [ 6 <iota> >vector 2 4 pick delete-slice ] unit-test
 
 [ 6 >vector 2 8 pick delete-slice ] must-fail
 
-{ V{ } } [ 6 iota >vector 0 6 pick delete-slice ] unit-test
+{ V{ } } [ 6 <iota> >vector 0 6 pick delete-slice ] unit-test
 
 { { 1 2 "a" "b" 5 6 7 } } [
     { "a" "b" } 2 4 { 1 2 3 4 5 6 7 }
@@ -265,18 +265,18 @@ unit-test
 
 { 0 } [ f length ] unit-test
 [ f first ] must-fail
-{ 3 } [ 3 10 iota nth ] unit-test
-{ 3 } [ 3 10 iota nth-unsafe ] unit-test
-[ -3 10 iota nth ] must-fail
-[ 11 10 iota nth ] must-fail
+{ 3 } [ 3 10 <iota> nth ] unit-test
+{ 3 } [ 3 10 <iota> nth-unsafe ] unit-test
+[ -3 10 <iota> nth ] must-fail
+[ 11 10 <iota> nth ] must-fail
 
 { f } [ f ?first ] unit-test
 { f } [ { } ?first ] unit-test
-{ 0 } [ 10 iota ?first ] unit-test
+{ 0 } [ 10 <iota> ?first ] unit-test
 
 { f } [ f ?last ] unit-test
 { f } [ { } ?last ] unit-test
-{ 9 } [ 10 iota ?last ] unit-test
+{ 9 } [ 10 <iota> ?last ] unit-test
 
 [ -1/0. 0 remove-nth! ] must-fail
 { "" } [ "" [ CHAR: \s = ] trim ] unit-test
@@ -288,10 +288,10 @@ unit-test
 { "asdf " } [ " asdf " [ CHAR: \s = ] trim-head ] unit-test
 { " asdf" } [ " asdf " [ CHAR: \s = ] trim-tail ] unit-test
 
-{ 328350 } [ 100 iota [ sq ] map-sum ] unit-test
+{ 328350 } [ 100 <iota> [ sq ] map-sum ] unit-test
 
-{ 50 } [ 100 iota [ even? ] count ] unit-test
-{ 50 } [ 100 iota [ odd?  ] count ] unit-test
+{ 50 } [ 100 <iota> [ even? ] count ] unit-test
+{ 50 } [ 100 <iota> [ odd?  ] count ] unit-test
 
 { { "b" "d" } } [ { 1 3 } { "a" "b" "c" "d" } nths ] unit-test
 { { "a" "b" "c" "d" } } [ { 0 1 2 3 } { "a" "b" "c" "d" } nths ] unit-test
@@ -328,14 +328,14 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
 
 { V{ 0 3 } } [ "A" { "A" "B" "C" "A" "D" } indices ] unit-test
 
-[ "asdf" iota ] must-fail
-[ -1 iota ] must-fail
-{ T{ iota-tuple { n 10 } } } [ 10 iota ] unit-test
-{ 0 } [ 10 iota first ] unit-test
-{ 0 } [ 0 iota sum ] unit-test
-{ 0 } [ 1 iota sum ] unit-test
-{ 10 } [ 5 iota sum ] unit-test
-{ 15 } [ 6 iota sum ] unit-test
+[ "asdf" <iota> ] must-fail
+[ -1 <iota> ] must-fail
+{ T{ iota { n 10 } } } [ 10 <iota> ] unit-test
+{ 0 } [ 10 <iota> first ] unit-test
+{ 0 } [ 0 <iota> sum ] unit-test
+{ 0 } [ 1 <iota> sum ] unit-test
+{ 10 } [ 5 <iota> sum ] unit-test
+{ 15 } [ 6 <iota> sum ] unit-test
 
 { "hi" 3 } [
     { 1 2 3 4 5 6 7 8 } [ H{ { 3 "hi" } } at ] map-find
@@ -371,8 +371,8 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
 [ { } { } [ + ] [ + ] 2map-reduce ] must-fail
 { 24 } [ { 1 2 } { 3 4 } [ + ] [ * ] 2map-reduce ] unit-test
 
-{ 4 } [ 5 iota [ ] supremum-by ] unit-test
-{ 0 } [ 5 iota [ ] infimum-by ] unit-test
+{ 4 } [ 5 <iota> [ ] supremum-by ] unit-test
+{ 0 } [ 5 <iota> [ ] infimum-by ] unit-test
 { "bar" } [ { "bar" "baz" "qux" } [ length ] supremum-by ] unit-test
 { "bar" } [ { "bar" "baz" "qux" } [ length ] infimum-by ] unit-test
 { { "foo" } } [ { { "foo" } { "bar" } } [ first ] supremum-by ] unit-test
index 715b3b9107fdcd8531f6f099b98263bc50ea21b7..b547bde29806bb707c3687f238244f380984017f 100644 (file)
@@ -102,18 +102,18 @@ M: f like drop [ f ] when-empty ; inline
 INSTANCE: f immutable-sequence
 
 ! Integer sequences
-TUPLE: iota-tuple { n integer read-only } ;
+TUPLE: iota { n integer read-only } ;
 
 ERROR: non-negative-integer-expected n ;
 
-: iota ( n -- iota )
+: <iota> ( n -- iota )
     dup 0 < [ non-negative-integer-expected ] when
-    iota-tuple boa ; inline
+    iota boa ; inline
 
-M: iota-tuple length n>> ; inline
-M: iota-tuple nth-unsafe drop ; inline
+M: iota length n>> ; inline
+M: iota nth-unsafe drop ; inline
 
-INSTANCE: iota-tuple immutable-sequence
+INSTANCE: iota immutable-sequence
 
 <PRIVATE
 
@@ -608,7 +608,7 @@ PRIVATE>
     (each-index) each-integer ; inline
 
 : map-index-as ( ... seq quot: ( ... elt index -- ... newelt ) exemplar -- ... newseq )
-    [ dup length iota ] 2dip 2map-as ; inline
+    [ dup length <iota> ] 2dip 2map-as ; inline
 
 : map-index ( ... seq quot: ( ... elt index -- ... newelt ) -- ... newseq )
     { } map-index-as ; inline
@@ -1059,7 +1059,7 @@ PRIVATE>
 
 GENERIC: sum ( seq -- n )
 M: object sum 0 [ + ] binary-reduce ; inline
-M: iota-tuple sum length dup 1 - * 2/ ; inline
+M: iota sum length dup 1 - * 2/ ; inline
 M: repetition sum [ elt>> ] [ length>> ] bi * ; inline
 
 : product ( seq -- n ) 1 [ * ] binary-reduce ;
@@ -1114,7 +1114,7 @@ PRIVATE>
 : generic-flip ( matrix -- newmatrix )
     [
         [ first-unsafe length 1 ] keep
-        [ length min ] setup-each (each-integer) iota
+        [ length min ] setup-each (each-integer) <iota>
     ] keep
     [ [ nth-unsafe ] with { } map-as ] curry { } map-as ; inline
 
@@ -1127,7 +1127,7 @@ USE: arrays
     { array } declare
     [
         [ first-unsafe array-length 1 ] keep
-        [ array-length min ] setup-each (each-integer) iota
+        [ array-length min ] setup-each (each-integer) <iota>
     ] keep
     [ [ { array } declare array-nth ] with { } map-as ] curry { } map-as ;
 
index d0a9459af8d8a61a9d8729d72c1d1266c7de3608..5560bdcea38eb080146e08103873093a5c5d06b6 100644 (file)
@@ -271,7 +271,7 @@ M: slot-spec make-slot
     [ make-slot ] map ;
 
 : finalize-slots ( specs base -- specs )
-    over length iota [ + ] with map [ >>offset ] 2map ;
+    over length <iota> [ + ] with map [ >>offset ] 2map ;
 
 : slot-named* ( name specs -- offset spec/f )
     [ name>> = ] with find ;
index 70716c905b3016d40da4cb24585012340a2a91a9..5c2d0972eed42d380de28d5144a3beacc1a02b16 100644 (file)
@@ -4,7 +4,7 @@ sorting tools.test vocabs ;
 { { } } [ { } natural-sort ] unit-test
 
 { { 270000000 270000001 } }
-[ T{ slice f 270000000 270000002 T{ iota-tuple f 270000002 } } natural-sort ]
+[ T{ slice f 270000000 270000002 T{ iota f 270000002 } } natural-sort ]
 unit-test
 
 { t } [
index e208c29693cbf7fbdcf46068d5b2b0d7a0ac1fd7..432d9e7edf7b140a941ec903921142d747ae4c37 100644 (file)
@@ -88,11 +88,11 @@ namespaces random sequences tools.test vectors ;
 { 4 } [ 5 V{ 1 2 3 4 5 } index ] unit-test
 
 { t } [
-    100 iota >array dup >vector <reversed> >array [ reverse ] dip =
+    100 <iota> >array dup >vector <reversed> >array [ reverse ] dip =
 ] unit-test
 
 { fixnum } [ 1 >bignum V{ } new-sequence length class-of ] unit-test
 
-{ fixnum } [ 1 >bignum iota [ ] V{ } map-as length class-of ] unit-test
+{ fixnum } [ 1 >bignum <iota> [ ] V{ } map-as length class-of ] unit-test
 
 { V{ "lulz" } } [ "lulz" 1vector ] unit-test
index 7bbe473371f9aebb4fccc85c6e831f29bbb3e9c1..17c739e2cfc0f89a3d48d03db5086c17721274f5 100644 (file)
@@ -19,7 +19,7 @@ IN: alien.data.map.tests
         float-4{ 2.0 2.0 2.0 2.0 }
     }
 } [
-    3 iota [ float-4-with ] data-map( object -- float-4 )
+    3 <iota> [ float-4-with ] data-map( object -- float-4 )
     float-4 cast-array
 ] unit-test
 
@@ -30,7 +30,7 @@ IN: alien.data.map.tests
         float-4{ 8.0 9.0 10.0 11.0 }
     }
 } [
-    12 iota [ float-4-boa ] data-map( object[4] -- float-4 )
+    12 <iota> [ float-4-boa ] data-map( object[4] -- float-4 )
     float-4 cast-array
 ] unit-test
 
index 70f985c78d8f1123566145bf7450eda1e7a8cc8d..2577556131937bf7e7b16caf34e17104e1b26113 100644 (file)
@@ -151,10 +151,10 @@ M: sequence >col-array
 : ones ( shape -- shaped-array ) 1 repeated-shaped ;
 
 : increasing ( shape -- shaped-array )
-    [ shape-capacity iota >array ] [ ] bi <shaped-array> ;
+    [ shape-capacity <iota> >array ] [ ] bi <shaped-array> ;
 
 : decreasing ( shape -- shaped-array )
-    [ shape-capacity iota <reversed> >array ] [ ] bi <shaped-array> ;
+    [ shape-capacity <iota> <reversed> >array ] [ ] bi <shaped-array> ;
 
 : row-length ( shape -- n ) rest-slice product ; inline
 
@@ -215,7 +215,7 @@ ERROR: 2d-expected shaped ;
 
 ! : set-shaped-where ( .. elt sa quot -- )
     ! [
-        ! [ underlying>> [ length iota ] keep zip ]
+        ! [ underlying>> [ length <iota> ] keep zip ]
         ! [ ] bi
     ! ] dip '[ _ [ _ set- ] @ ] assoc-each ; inline
 
@@ -251,7 +251,7 @@ TUPLE: block-array shaped shape ;
     block-array boa ;
 
 : iteration-indices ( shaped -- seq )
-    [ iota ] [
+    [ <iota> ] [
         cartesian-product concat
         [ dup first array? [ first2 suffix ] when ] map
     ] map-reduce ;
index b8ab44773b1552cb8460d1a7cb926c767b3c2fec..1d2521c24699c72a6bffb9fbfeaad7d8af32ff3c 100644 (file)
@@ -172,8 +172,8 @@ ERROR: no-vorbis-in-ogg ;
     len max-len min :> len'
     pcm #channels void* <c-direct-array> :> channel*s
 
-    len' iota [| sample |
-        #channels iota [| channel |
+    len' <iota> [| sample |
+        #channels <iota> [| channel |
             channel channel*s nth len c:float <c-direct-array>
             sample swap nth
             float>short-sample short-buffer push
index 95202f35f984f75e8a51d14a34008ca52f2cdaeb..4f8499a4e3cda404582382bc37a765702e5ae26a 100644 (file)
@@ -4,7 +4,7 @@ USING: math sequences kernel base64 ;
 IN: benchmark.base64
 
 : base64-benchmark ( -- )
-    65535 iota [ 255 bitand ] "" map-as
+    65535 <iota> [ 255 bitand ] "" map-as
     20 [ >base64 base64> ] times
     drop ;
 
index 90187c0b77c068b7af787a8f2e4daebfb14a2222..732f58bab8fa111bd6768d8a8d34731eb746cfd0 100644 (file)
@@ -6,7 +6,7 @@ IN: benchmark.beust2
 ! http://crazybob.org/BeustSequence.java.html
 
 :: (count-numbers) ( remaining first value used max listener: ( -- ) -- ? )
-    10 first - iota [| i |
+    10 first - <iota> [| i |
         i first + :> digit
         digit 2^ :> mask
         i value + :> value'
@@ -28,7 +28,7 @@ IN: benchmark.beust2
     ] any? ; inline recursive
 
 :: count-numbers ( max listener -- )
-    10 iota [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ; inline
+    10 <iota> [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ; inline
 
 :: beust2-benchmark ( -- )
     0 :> i!
index 95b0a62b45af7df7ad936dcb910569f6a72d674b..7efa3f2d05238f3e60dd7196b57ec1498edf2c49 100644 (file)
@@ -3,7 +3,7 @@ USING: bloom-filters kernel math sequences ;
 IN: benchmark.bloom-filters
 
 : insert-data ( bloom-filter -- bloom-filter )
-    100 [ 2,000 iota [ over bloom-filter-insert ] each ] times ;
+    100 [ 2,000 <iota> [ over bloom-filter-insert ] each ] times ;
 
 : test-hit ( bloom-filter -- bloom-filter )
     100,000 [ 100 over bloom-filter-member? drop ] times ;
index bcc0e85620dc6bf6a985b2015aa7ac75478a1b5b..2b6d79feeb29ec0566d48128c0a9ed783e7815aa 100644 (file)
@@ -27,7 +27,7 @@ TUPLE: meeting-place count mailbox ;
         <mailbox> >>mailbox ;
 
 : make-creatures ( colors -- seq )
-    [ length iota ] [ ] bi [ <creature> ] 2map ;
+    [ length <iota> ] [ ] bi [ <creature> ] 2map ;
 
 : complement-color ( color1 color2 -- color3 )
     2dup = [ drop ] [
index ce7c26bddc9a6bee1e1625c4dab2a48b1771e0a3..ac925117e980274730f066fb09a37fb1097bf676 100644 (file)
@@ -17,7 +17,7 @@ IN: benchmark.combinatorics
     ] with each ;
 
 : bench-permutations ( n -- )
-    iota {
+    <iota> {
         [ all-permutations drop ]
         [ [ drop ] each-permutation ]
         [ [ first 2 = ] find-permutation drop ]
index e5df41e1d2c00121840c875a581979c69e91b67a..a430db8798c4f09b9a57cd1f7f9d674847aff73e 100644 (file)
@@ -4,7 +4,7 @@ USING: arrays csv kernel math.parser sequences ;
 IN: benchmark.csv
 
 : csv-benchmark ( -- )
-    1,000 200 iota [ number>string ] map <array>
+    1,000 200 <iota> [ number>string ] map <array>
     [ csv>string string>csv ] keep assert= ;
 
 MAIN: csv-benchmark
index 839bd89dc06792a632fdfc01b3f44e1c547d0011..3a4180061b11bd41de52340062611c47d5f7d4fe 100644 (file)
@@ -8,7 +8,7 @@ IN: benchmark.dawes
 : count-ones ( int-array -- n ) [ 1 = ] count ; inline
 
 : make-int-array ( -- int-array )
-    120000 iota [ 255 bitand ] int-array{ } map-as ; inline
+    120000 <iota> [ 255 bitand ] int-array{ } map-as ; inline
 
 : dawes-benchmark ( -- )
     200 make-int-array '[ _ count-ones ] replicate drop ;
index c57fbdb998adcfeee0682be9a2351a57b7798e04..659a2428faf2fd4e1858524e5ba0290ffc3fee5b 100644 (file)
@@ -5,8 +5,8 @@ IN: benchmark.dispatch2
 
 : sequences ( -- seq )
     [
-        1 iota ,
-        10 >bignum iota ,
+        1 <iota> ,
+        10 >bignum <iota> ,
         { 1 2 3 } ,
         "hello world" ,
         SBUF" sbuf world" ,
@@ -14,7 +14,7 @@ IN: benchmark.dispatch2
         double-array{ 1.0 2.0 3.0 } ,
         "hello world" 4 tail-slice ,
         10 f <repetition> ,
-        100 iota 2 <groups> ,
+        100 <iota> 2 <groups> ,
         "hello" <reversed> ,
         { { 1 2 } { 3 4 } } 0 <column> ,
         ?{ t f t } ,
index 04c2acfd5946495af823afda8c0f1a561b07c696..9e7f7219b4c236a54b9353c9e27e754d2f02e8b5 100644 (file)
@@ -4,8 +4,8 @@ USING: deques dlists kernel math sequences ;
 IN: benchmark.dlists
 
 : dlists-benchmark ( -- )
-    5,000 iota [
-        [ iota 0 swap >dlist [ + ] slurp-deque ]
+    5,000 <iota> [
+        [ <iota> 0 swap >dlist [ + ] slurp-deque ]
         [ dup 1 - * 2 / ] bi assert=
     ] each ;
 
index 4da5cff828b91d499574e2c00fd0af8e123947c4..c1220231fd22fa5c826ea5f0d0f5e2299954d000 100644 (file)
@@ -5,7 +5,7 @@ sequences ;
 IN: benchmark.e-decimals
 
 : D-factorial ( n -- D! )
-    iota DECIMAL: 1 [ 0 <decimal> DECIMAL: 1 D+ D* ] reduce ; inline
+    <iota> DECIMAL: 1 [ 0 <decimal> DECIMAL: 1 D+ D* ] reduce ; inline
 
 :: calculate-e-decimals ( n -- e )
     n [1,b] DECIMAL: 1
index b4bec1409dfe1750a5566cd99529ea1c92ffbfe6..6d1e03b4d027390f0480212f12a218c508d6cb36 100644 (file)
@@ -4,7 +4,7 @@ USING: kernel math math.combinatorics math.ranges sequences ;
 IN: benchmark.e-ratios
 
 : calculate-e-ratios ( n -- e )
-    iota [ factorial recip ] map-sum ;
+    <iota> [ factorial recip ] map-sum ;
 
 : e-ratios-benchmark ( -- )
     5 [ 300 calculate-e-ratios drop ] times ;
index ff72d5db445cb2a036d185a13dd3171a50e88e15..45b280a4d8af989b364f18857bbc6a57dfdbd796 100644 (file)
@@ -2,7 +2,7 @@ USING: math math.private kernel sequences ;
 IN: benchmark.empty-loop-2
 
 : empty-loop-2 ( n -- )
-    iota [ drop ] each ;
+    <iota> [ drop ] each ;
 
 : empty-loop-2-benchmark ( -- )
     50000000 empty-loop-2 ;
index a81990aa3b22f03047d6ff42c9a1d11e80e67da8..d07824e7967d5c7ecf15abf79ec37440cea0d311 100644 (file)
@@ -24,7 +24,7 @@ IN: benchmark.fannkuch
 
 : fannkuch ( n -- )
     [
-        [ 0 0 ] dip iota [ 1 + ] B{ } map-as
+        [ 0 0 ] dip <iota> [ 1 + ] B{ } map-as
         [ fannkuch-step ] each-permutation nip
     ] keep
     "Pfannkuchen(" write pprint ") = " write . ;
index ccf695bf726d512828fbdefdf7498e7d49349c48..f602db3b03a18c57047a95f005150b3764f7eaee 100644 (file)
@@ -69,7 +69,7 @@ TYPED: write-random-fasta ( seed: float n: fixnum chars: byte-array floats: doub
 
 TYPED:: make-repeat-fasta ( k: fixnum len: fixnum alu: string -- k': fixnum )
     alu length :> kn
-    len iota [ k + kn mod alu nth-unsafe ] "" map-as print
+    len <iota> [ k + kn mod alu nth-unsafe ] "" map-as print
     k len + ;
 
 : write-repeat-fasta ( n alu desc id -- )
index d18c4a8261555c8d47d77b591f108bf426fb0c5d..68be9402ddec102bc59aed77dc1352960d2a2d19 100644 (file)
@@ -3,6 +3,6 @@
 USING: math sequences kernel ;
 IN: benchmark.gc1
 
-: gc1-benchmark ( -- ) 600000 iota [ >bignum 1 + ] map drop ;
+: gc1-benchmark ( -- ) 600000 <iota> [ >bignum 1 + ] map drop ;
 
 MAIN: gc1-benchmark
index a6fbefb78c93dd79d1b9b140b89f35b36be0fb80..926096bd1780a18ebc9bf00925c4e2d8a42a6629 100644 (file)
@@ -4,7 +4,7 @@ USING: math.parser fry sequences kernel assocs hashtables ;
 IN: benchmark.gc3
 
 : gc3-benchmark ( -- )
-    1000000 iota
+    1000000 <iota>
     1000000 <hashtable>
     '[ [ number>string ] keep _ set-at ] each ;
 
index cef4f996220ab7c0fa31f6c529934ebdb0054b25..8e4b8d49ad0202eb61750c2d774fa73922da7c04 100644 (file)
@@ -6,7 +6,7 @@ IN: benchmark.hash-sets
 
 CONSTANT: test-sets $[
     { 10 100 1,000 10,000 50,000 100,000 }
-    [ iota >hash-set ] map dup append
+    [ <iota> >hash-set ] map dup append
 ]
 
 : do-times ( n quot: ( set1 set2 -- set' ) -- )
index 4b2a14fb0defe2948d40b938e2971d592598eb33..563621ef1e402e6910950aad6c9a97128e60af11 100644 (file)
@@ -2,7 +2,7 @@ IN: benchmark.iteration
 USING: sequences vectors arrays strings sbufs math math.vectors
 kernel ;
 
-: <range> ( from to -- seq ) dup iota <slice> ; inline
+: <range> ( from to -- seq ) dup <iota> <slice> ; inline
 
 : vector-iter ( -- ) 100 [ 0 100000 <range> >vector [ ] map drop ] times ;
 : array-iter ( -- ) 100 [ 0 100000 <range> >array [ ] map drop ] times ;
index 2f6e3f762b16dc2a7826748499b77758cfee0df6..06acfaa4fd52e9610b24f5af9428c5cd12fe9a2c 100644 (file)
@@ -5,7 +5,7 @@ sequences ;
 IN: benchmark.json
 
 : json-benchmark ( -- )
-    200 iota [ [ number>string ] keep ] H{ } map>assoc
+    200 <iota> [ [ number>string ] keep ] H{ } map>assoc
     1,000 [ >json json> ] times drop ;
 
 MAIN: json-benchmark
index 4e4a38cf1437d951db3769d37c468d976bd35158..e91d87301e6f8980dc0e72df60526131b0de5dc6 100644 (file)
@@ -4,7 +4,7 @@ sequences ;
 IN: benchmark.linked-assocs
 
 : (linked-assocs-benchmark) ( -- )
-    10,000 iota <linked-hash> {
+    10,000 <iota> <linked-hash> {
         [ '[ 0 swap _ set-at ] each ]
         [ '[ _ at ] map-sum 0 assert= ]
         [ '[ dup _ set-at ] each ]
index 9eb8d155f1376b0e8e35d89a14300f73ddc9e2c2..b28c202c8bac4eb6b10808074af18fa8a069b915 100644 (file)
@@ -9,13 +9,13 @@ IN: benchmark.make
     [ [ CHAR: a , ] times ] "" make ;
 
 : make-arrays ( n -- seq )
-    [ iota % ] { } make ;
+    [ <iota> % ] { } make ;
 
 : make-vectors ( n -- seq )
-    [ iota % ] V{ } make ;
+    [ <iota> % ] V{ } make ;
 
 : make-benchmark ( -- )
-    5,000 iota [
+    5,000 <iota> [
         [ make-strings ] [ make-arrays ] [ make-vectors ] tri
         3drop
     ] each ;
index 87a2df6fe545b05a4335ec05e82482efaf63790c..bcae43ea4138aceb612c45b52fa37a16f28a9ab8 100644 (file)
@@ -11,7 +11,7 @@ CONSTANT: sat 0.85
 CONSTANT: val 0.85
 
 : <color-map> ( nb-cols -- map )
-    [ iota ] keep '[
+    [ <iota> ] keep '[
         360 * _ 1 + / sat val
         1 <hsva> >rgba scale-rgb
     ] map ;
index f973411030dd41af7b546edc6b0ebce8caf9f929..9d30ff39c9c04f0dc7948bb5768c95d85053809c 100644 (file)
@@ -24,7 +24,7 @@ IN: benchmark.mandel
     [ color-map [ length mod ] keep nth ] [ B{ 0 0 0 } ] if* ; inline
 
 : render ( -- )
-    height iota [ width iota swap '[ _ c pixel color write ] each ] each ; inline
+    height <iota> [ width iota swap '[ _ c pixel color write ] each ] each ; inline
 
 : ppm-header ( -- )
     ascii encode-output
index c830c5a0edef0dc00d8f731d0fcda8eb63bec3ba..8324f8266e2e15052fdcd674f07d28fdec85bec2 100644 (file)
@@ -9,7 +9,7 @@ IN: benchmark.matrix-exponential-scalar
         { 0.0 0.0 0.0 0.0 }
         { 0.0 0.0 0.0 0.0 }
     }
-    iterations iota [| i |
+    iterations <iota> [| i |
         m i m^n i factorial >float m/n m+
     ] each ;
 
index 2ff938f520a8ec0c960024ae4d751240aaa0d82f..e9de8eebaaad404edc9e0262e65c8f6c0e80682d 100644 (file)
@@ -4,7 +4,7 @@ IN: benchmark.matrix-exponential-simd
 
 TYPED:: e^m4 ( m: matrix4 iterations: fixnum -- e^m: matrix4 )
     zero-matrix4
-    iterations iota [| i |
+    iterations <iota> [| i |
         m i m4^n i factorial >float m4/n m4+
     ] each ;
 
index 3ec429248a5c99b5a80e6c4f7e01250470456579..40926758f8d6265bf1a8993a198c156153f38963 100644 (file)
@@ -2,6 +2,6 @@ USING: checksums checksums.md5 sequences byte-arrays kernel ;
 IN: benchmark.md5
 
 : md5-benchmark ( -- )
-    2000000 iota >byte-array md5 checksum-bytes drop ;
+    2000000 <iota> >byte-array md5 checksum-bytes drop ;
 
 MAIN: md5-benchmark
index 093b66ad5d58431e22ccad2dcd05f0b6c71098cb..f48e85ebae7aed918ca84a17f55e6e1084aa65ad 100644 (file)
@@ -11,7 +11,7 @@ MEMO: mem4 ( n n n n -- n ) + + + ;
 
 : memoize-benchmark ( -- )
     1000 [
-        1000 iota [
+        1000 <iota> [
             mem0 [ mem1 ] keep [ mem2 ] 2keep [ mem3 ] 3keep mem4 drop
         ] each
     ] times ;
index 010839b4f11b33a70e52d7833355b10c0bcb01f1..bbd70c738b5199166ac6f991279934b295b73e91 100644 (file)
@@ -8,7 +8,7 @@ IN: benchmark.msgpack
     [ >msgpack msgpack> length ] map-sum ;
 
 : msgpack-benchmark ( -- )
-    500,000 iota pack-sum 124,999,750,000 assert=
+    500,000 <iota> pack-sum 124,999,750,000 assert=
     500,000 "hello" <repetition> pack-sum-lengths 2,500,000 assert=
     500,000 pi <repetition> pack-sum 0x1.7f7ec53a9f04ap20 assert= ;
 
index 856a1a0f40668cb0d7f3d03560b2fa21a206f528..33077555dab2f0930144960b0ab73867f22672d8 100644 (file)
@@ -2,7 +2,7 @@ USING: kernel math math.parser sequences ;
 IN: benchmark.parse-bignum
 
 : parse-bignum-benchmark ( -- )
-    3000 iota [
+    3000 <iota> [
         2^ [ number>string string>number ] [ assert= ] bi
     ] each ;
 
index c88c3c5151d1e2083692c30f18293b904dfa97f3..b4898cdf920989cc5e72087b01557e9e0f8e96cb 100644 (file)
@@ -2,7 +2,7 @@ USING: kernel math.parser sequences ;
 IN: benchmark.parse-fixnum
 
 : parse-fixnum-benchmark ( -- )
-    2,000,000 iota [
+    2,000,000 <iota> [
         [ number>string string>number ] [ assert= ] bi
     ] each ;
 
index b32ce928a27a2ab5a11a3965602069eb1f7f38d6..dc898a5be99dae9490fae5146c6d730f6b3e116e 100644 (file)
@@ -5,7 +5,7 @@ combinators hints fry sequences ;
 IN: benchmark.partial-sums
 
 ! Helper words
-: summing-integers ( n quot -- y ) [ 0.0 ] [ iota ] [ ] tri* '[ 1 + @ + ] each ; inline
+: summing-integers ( n quot -- y ) [ 0.0 ] [ <iota> ] [ ] tri* '[ 1 + @ + ] each ; inline
 : summing-floats ( n quot -- y ) '[ >float @ ] summing-integers ; inline
 : cube ( x -- y ) dup dup * * ; inline
 : -1^ ( n -- -1/1 ) 2 mod 2 * 1 - ; inline
index 54388a72c403a038bd915d9c53a630af3fe993d8..55e05ea9443f588efe434ae626720f555a4a9d87 100644 (file)
@@ -1,7 +1,7 @@
 USING: arrays kernel literals random sequences ;
 IN: benchmark.randomize
 
-CONSTANT: data $[ 10,000,000 iota >array ]
+CONSTANT: data $[ 10,000,000 <iota> >array ]
 
 : randomize-benchmark ( -- )
     data randomize drop ;
index 6052922a3967ff7821704bb8eb355d99533cfcc0..86f438cd4c460571b1abeb55563faae8dc12e824 100644 (file)
@@ -140,8 +140,8 @@ CONSTANT: create-offsets
 
 : ray-pixel ( scene point -- ray-grid )
     [ 0.0 ] 2dip
-    oversampling iota [
-        oversampling iota [
+    oversampling <iota> [
+        oversampling <iota> [
             ss-point v+ normalize
             double-4{ 0.0 0.0 -4.0 0.0 } swap <ray>
             swap cast-ray +
@@ -149,8 +149,8 @@ CONSTANT: create-offsets
     ] 2with each ; inline no-compile
 
 : ray-trace ( scene -- grid )
-    size iota <reversed> [
-        size iota [
+    size <iota> <reversed> [
+        size <iota> [
             [ size 0.5 * - ] bi@ swap size
             0.0 double-4-boa ray-pixel
         ] 2with map
index c246f1538fb6f76ec8668fb46e5cc70737747665..1252d402abfa533b866e76f138150ea34f8a1cd3 100644 (file)
@@ -148,7 +148,7 @@ DEFER: create
     [ oversampling /f ] bi@ 0.0 double-array{ } 3sequence ;
 
 : ss-grid ( -- ss-grid )
-    oversampling iota [ oversampling iota [ ss-point ] with map ] map ;
+    oversampling <iota> [ oversampling iota [ ss-point ] with map ] map ;
 
 : ray-grid ( point ss-grid -- ray-grid )
     [
@@ -160,8 +160,8 @@ DEFER: create
     [ [ swap cast-ray + ] with each ] with each ;
 
 : pixel-grid ( -- grid )
-    size iota reverse [
-        size iota [
+    size <iota> reverse [
+        size <iota> [
             [ size 0.5 * - ] bi@ swap size
             double-array{ } 3sequence
         ] with map
index aa0d5bff2c995f2e9e860c1e6d35c939193fa7ad..823c4899b962973339da394e2c66604c804215f4 100644 (file)
@@ -6,8 +6,8 @@ IN: benchmark.regexp
 
 : regexp-benchmark ( -- )
     200
-    20,000 iota [ number>string ] map
-    200 iota [ 1 + CHAR: a <string> ] map
+    20,000 <iota> [ number>string ] map
+    200 <iota> [ 1 + CHAR: a <string> ] map
     '[
         _ R/ \d+/ [ matches? ] curry all? t assert=
         _ R/ [a]+/ [ matches? ] curry all? t assert=
index 509538a1751df7ece5f56119e9ad8636fe71a6f5..6281824a21a2ff75b92d5519069be889686f2f83 100644 (file)
@@ -13,7 +13,7 @@ SYMBOL: done
     ] times ;
 
 : send-messages ( messages target -- )
-    [ dup iota ] dip [ send ] curry each [ receive drop ] times ;
+    [ dup <iota> ] dip [ send ] curry each [ receive drop ] times ;
 
 : destroy-ring ( target -- )
     done swap send [ done eq? ] receive-if drop ;
index 50675645e067007f28bf25da16a253b64a95f75c..523de80627e0b32f6c2977c8f9c411867c6568ab 100644 (file)
@@ -2,17 +2,17 @@ USING: checksums checksums.sha sequences byte-arrays kernel ;
 IN: benchmark.sha1
 
 : sha1-benchmark ( -- )
-    2000000 iota >byte-array sha1 checksum-bytes drop ;
+    2000000 <iota> >byte-array sha1 checksum-bytes drop ;
 
 : sha224-benchmark ( -- )
-    2000000 iota >byte-array sha-224 checksum-bytes drop ;
+    2000000 <iota> >byte-array sha-224 checksum-bytes drop ;
 
 : sha256-benchmark ( -- )
-    2000000 iota >byte-array sha-256 checksum-bytes drop ;
+    2000000 <iota> >byte-array sha-256 checksum-bytes drop ;
 
 USE: checksums.openssl
 
 : openssl-sha1-benchmark ( -- )
-    2000000 iota >byte-array openssl-sha1 checksum-bytes drop ;
+    2000000 <iota> >byte-array openssl-sha1 checksum-bytes drop ;
 
 MAIN: sha1-benchmark
index 41e26ed7711d5975a855cf9496385883fdb5cb9b..bfe932b932ee36dda9ffa31cefcc738931a04bde 100644 (file)
@@ -11,7 +11,7 @@ IN: benchmark.simd-1
     0.0 float-4-boa ; inline
 
 : make-points ( len -- points )
-    iota [ <point> ] float-4-array{ } map-as ; inline
+    <iota> [ <point> ] float-4-array{ } map-as ; inline
 
 : normalize-points ( points -- )
     [ normalize ] map! drop ; inline
index c3f8ae32d0e44b09883449b9490272df4be2a7ff..70744c13de72f4a53b014a8a08ab7b3c0988fea7 100644 (file)
@@ -2,7 +2,7 @@ USING: assocs kernel literals math random sequences sorting ;
 IN: benchmark.sort
 
 CONSTANT: numbers-to-sort $[ 300,000 200 random-integers ]
-CONSTANT: alist-to-sort $[ 1,000 iota dup zip ]
+CONSTANT: alist-to-sort $[ 1,000 <iota> dup zip ]
 
 : sort-benchmark ( -- )
     10 [ numbers-to-sort natural-sort drop ] times
index c0c4af8526a6787c5f9847cef94d856bcfe61649..03156cc83f7ccb5bd26b3b3a86dfa47a07b5eacb 100644 (file)
@@ -8,8 +8,8 @@ SPECIALIZED-ARRAYS: double double-4 ;
 IN: benchmark.spectral-norm-simd
 
 :: inner-loop ( u n quot -- seq )
-    n 4 /i iota [| i |
-        n iota [| j | u i j quot call ] [ v+ ] map-reduce
+    n 4 /i <iota> [| i |
+        n <iota> [| j | u i j quot call ] [ v+ ] map-reduce
     ] double-4-array{ } map-as ; inline
 
 : eval-A ( i j -- n )
index f8ab57028cde5048f0e02ca22decb1aee3a04fff..cdfca74101140d906f75148dfd5bc5be1848347c 100644 (file)
@@ -10,8 +10,8 @@ SPECIALIZED-ARRAY: double
 IN: benchmark.spectral-norm
 
 :: inner-loop ( u n quot -- seq )
-    n iota [| i |
-        n iota 0.0 [| j |
+    n <iota> [| i |
+        n <iota> 0.0 [| j |
             u i j quot call +
         ] reduce
     ] double-array{ } map-as ; inline
index 71bd4e99ea19b971f14114e1e2598d857e5f619f..7ad9d97bc882bf2faf9b394d5aace3573955c369 100644 (file)
@@ -7,7 +7,7 @@ sorting trees.splay ;
 IN: benchmark.splay
 
 : initial-alist ( n -- alist )
-    iota >array randomize dup zip ;
+    <iota> >array randomize dup zip ;
 
 : change-random ( newkeys splay keys -- splay' )
     swapd [ first pick delete-at first2 pick set-at ] 2each ;
index 55351b20821b92df7f1695ca88e650a0eddd0815..fb3dc4f722a66a987f8b4754b9cba95071cf1052 100644 (file)
@@ -2,7 +2,7 @@ USING: kernel math sequences splitting ;
 IN: benchmark.splitting
 
 : test-data ( -- seq seps )
-    1000 iota dup [ 10 /i zero? ] filter ; ! not inline to prevent type inference
+    1000 <iota> dup [ 10 /i zero? ] filter ; ! not inline to prevent type inference
 
 : splitting-benchmark ( -- )
     test-data 2,000 [
index b7b37d09b698d85c7a8f69a871f01f8200ac1a68..893619669aecaed20e58f24ae92fec25e86ea5dc 100644 (file)
@@ -4,7 +4,7 @@ IN: benchmark.sum-file
 
 <<
 "sum-file.txt" temp-file ascii [
-    100000 iota [ number>string print ] each
+    100000 <iota> [ number>string print ] each
 ] with-file-writer
 >>
 
index b5a19beb0baae648964b966dffd938204f0d6802..3155ae68f53bd169f30b93b6f70bd11807a58a50 100644 (file)
@@ -8,7 +8,7 @@ IN: benchmark.tcp-echo0
 ! Max size here is 26 2^ 1 - because array-capacity limits on 32bit platforms
 CONSTANT: test-size0 $[ 23 2^ 1 - ]
 
-MEMO: test-bytes ( n -- byte-array ) iota >byte-array ;
+MEMO: test-bytes ( n -- byte-array ) <iota> >byte-array ;
 
 TUPLE: tcp-echo < threaded-server #times #bytes ;
 
index 0f5313b41e2ce2e8606fd83ac139a0a3f29da821..1b80330b1695f0dd6babe9bfb87d1726c4f0648c 100644 (file)
@@ -8,7 +8,7 @@ TUPLE: point { x float } { y float } { z float } ; final
 TUPLE-ARRAY: point
 
 : tuple-arrays-benchmark ( -- )
-    1,000 iota [
+    1,000 <iota> [
         drop 5,000 <point-array> [
             [ 1 + ] change-x
             [ 1 - ] change-y
index df7755f61fb4d8be789f8d22ce81054ce89146f5..9338245b62caa708b807ab3a3c1eac72ff93e413 100644 (file)
@@ -11,7 +11,7 @@ IN: benchmark.udp-echo0
 
 : udp-echo ( #times #bytes -- )
     '[
-        _ iota [ _ >be ] map
+        _ <iota> [ _ >be ] map
         "127.0.0.1" 0 <inet4> <datagram> &dispose
         "127.0.0.1" 0 <inet4> <datagram> &dispose
         [ send/recv ] 2curry each
index 345ef36d552e53ac1d571cbb25d218afbd2483b2..f68943788759d1d51bb66c214ad6879f7432b398 100644 (file)
@@ -2,6 +2,6 @@ USING: io kernel math.parser sequences ui.gadgets.panes ;
 IN: benchmark.ui-panes
 
 : ui-panes-benchmark ( -- )
-    [ 10000 iota [ number>string print ] each ] make-pane drop ;
+    [ 10000 <iota> [ number>string print ] each ] make-pane drop ;
 
 MAIN: ui-panes-benchmark
index 7bd8d0335f93775ef859d71579b7618fc020bfd0..ca8f1b215ff66e1e46e1459aaecde71478031161 100644 (file)
@@ -4,7 +4,7 @@ USING: kernel math math.parser sequences wrap wrap.strings ;
 IN: benchmark.wrap
 
 : wrap-benchmark ( -- )
-    1,000 iota [ number>string ] map " " join
+    1,000 <iota> [ number>string ] map " " join
     100 [ dup 80 wrap-string drop ] times drop ;
 
 MAIN: wrap-benchmark
index 3da80ec192176b9a23681621a7b7848b4242949b..7f4702082100dac904586574944935982b4afa8b 100644 (file)
@@ -28,9 +28,9 @@ STRUCT: yuv-buffer
         h >>uv_height
         w >>y_stride
         w >>uv_stride
-        w h * iota [ dup * ] B{ } map-as malloc-byte-array &free >>y
-        w h * 2/ iota [ dup dup * * ] B{ } map-as malloc-byte-array &free >>u
-        w h * 2/ iota [ dup * dup * ] B{ } map-as malloc-byte-array &free >>v ;
+        w h * <iota> [ dup * ] B{ } map-as malloc-byte-array &free >>y
+        w h * 2/ <iota> [ dup dup * * ] B{ } map-as malloc-byte-array &free >>u
+        w h * 2/ <iota> [ dup * dup * ] B{ } map-as malloc-byte-array &free >>v ;
 
 : clamp ( n -- n )
     255 min 0 max ; inline
@@ -75,12 +75,12 @@ STRUCT: yuv-buffer
 
 : yuv>rgb-row ( index rgb yuv y -- index )
     over stride
-    pick y_width>> iota
+    pick y_width>> <iota>
     [ yuv>rgb-pixel ] 4 nwith each ; inline
 
 TYPED: yuv>rgb ( rgb: byte-array yuv: yuv-buffer -- )
     [ 0 ] 2dip
-    dup y_height>> iota
+    dup y_height>> <iota>
     [ yuv>rgb-row ] 2with each
     drop ;
 
index 9e0a27f4732ef7d2463b30659ca13743d4194a9c..205c5e116a3cdd00d57a54cc6f47142132ba28f3 100644 (file)
@@ -35,7 +35,7 @@ IN: bloom-filters.tests
 
 ! Should not generate bignum hash codes.  Enhanced double hashing may generate a
 ! lot of hash codes, and it's better to do this earlier than later.
-{ t } [ 10000 iota [ double-hashcodes [ fixnum? ] both? ] all? ] unit-test
+{ t } [ 10000 <iota> [ double-hashcodes [ fixnum? ] both? ] all? ] unit-test
 
 : empty-bloom-filter ( -- bloom-filter )
     0.01 2000 <bloom-filter> ;
@@ -50,24 +50,24 @@ IN: bloom-filters.tests
 { 1 } [ basic-insert-test-setup count>> ] unit-test
 
 : non-empty-bloom-filter ( -- bloom-filter )
-    1000 iota
+    1000 <iota>
     empty-bloom-filter
     [ [ bloom-filter-insert ] curry each ] keep ;
 
 : full-bloom-filter ( -- bloom-filter )
-    2000 iota
+    2000 <iota>
     empty-bloom-filter
     [ [ bloom-filter-insert ] curry each ] keep ;
 
 ! Should find what we put in there.
-{ t } [ 2000 iota
+{ t } [ 2000 <iota>
         full-bloom-filter
         [ bloom-filter-member? ] curry map
         [ ] all?
 ] unit-test
 
 ! We shouldn't have more than 0.01 false-positive rate.
-{ t } [ 1000 iota [ drop most-positive-fixnum random 1000 + ] map
+{ t } [ 1000 <iota> [ drop most-positive-fixnum random 1000 + ] map
         full-bloom-filter
         [ bloom-filter-member? ] curry map
         [ ] count
index 192b1c86bb977c02230a0d7d599caa21ee9c0d8d..086574018fce353892ffa3e7d022c61093a60daf 100644 (file)
@@ -35,7 +35,7 @@ TYPED: with-length ( quot -- bytes-written: integer start-index: integer )
 <PRIVATE
 
 : write-le ( x n -- )
-    iota [ nth-byte write1 ] with each ; inline
+    <iota> [ nth-byte write1 ] with each ; inline
 
 TYPED: write-int32 ( int: integer -- )
     INT32-SIZE write-le ; inline
index 7f5222342a95e7ae1b3eaf523e9e82f2f2ff681a..132229b1bc4140711a4f870d20d0dfb17d246c58 100644 (file)
@@ -107,8 +107,8 @@ M:: chipmunk-world begin-game-world ( world -- )
     space 2.0 10000 cpSpaceResizeActiveHash
     space 1 >>iterations drop
 
-    image-height iota [| y |
-        image-width iota [| x |
+    image-height <iota> [| y |
+        image-width <iota> [| x |
             x y get-pixel [
                 x image-width 2 / - 0.05 random-unit * + 2 *
                 image-height 2 / y - 0.05 random-unit * + 2 *
index 53f9fce988a5e0e18fd6a07027d9e19d9ad65142..cc5b53495d36d93758e7cbbabbc4d056c91f6bc9 100644 (file)
@@ -108,7 +108,7 @@ M: vectored-T struct-transpose
     [ vectored-element> ] T-array new map-as ; inline
 
 M: T-array struct-transpose
-    dup length [ nip iota ] [ drop ] [ nip (vectored-T) ] 2tri
+    dup length [ nip <iota> ] [ drop ] [ nip (vectored-T) ] 2tri
     [ [ [ nth ] [ set-nth ] bi-curry* bi ] 2curry each ] keep ; inline
 
 ;FUNCTOR
index e5efdfce831e2bb7417a85967c1ca3b9efff9a4e..0cb6682cd6eeed92ffea7857c3503924baa26ebd 100644 (file)
@@ -30,7 +30,7 @@ GENERIC: >expr ( insn -- expr )
     [
         [ , [ f <array> ] % ]
         [
-            dup iota [
+            dup <iota> [
                 - 1 - , [ swap [ set-array-nth ] keep ] %
             ] with each
         ] bi
index 5ca35162e7e31d2245cd25e0a96ac507b97479f7..24b59deb0d39827542fcfb33d83b80c6e6a44b43 100644 (file)
@@ -20,7 +20,7 @@ IN: compiler.cfg.gvn.simd
 ! should be redone completely.
 
 : useless-shuffle-vector-imm? ( insn -- ? )
-    [ shuffle>> ] [ rep>> rep-length iota ] bi sequence= ;
+    [ shuffle>> ] [ rep>> rep-length <iota> ] bi sequence= ;
 
 : compose-shuffle-vector-imm ( outer inner -- insn' )
     2dup [ rep>> ] bi@ eq? [
index 4a09e828420a0bfd690bc7b00fdd561ae76702c6..0f17e8459c2a807a56388ec4e439cd998c1e3496 100644 (file)
@@ -26,7 +26,7 @@ PRIVATE>
     '[ CHAR: \0 _ ? ] "" map-as append
     md5 checksum-bytes :> final!
 
-    1000 iota [
+    1000 <iota> [
         "" swap
         {
             [ 0 bit? password final ? append ]
index 45bbe55d6eb2deb34ecbac8437241ec6cdec9e12..5b274dbd713aa64056ba8652d7f8451fd59abb53 100644 (file)
@@ -9,4 +9,4 @@ ERROR: empty-xor-key ;
 
 : xor-crypt ( seq key -- seq' )
     [ empty-xor-key ] when-empty
-    [ dup length iota ] dip '[ _ mod-nth bitxor ] 2map ;
+    [ dup length <iota> ] dip '[ _ mod-nth bitxor ] 2map ;
index 079234b2ee26dd858a2f3b16ba66a478c972b09e..dc69946648dc5f9618d5b8d11a4aea88d1c8c3ea 100644 (file)
@@ -14,7 +14,7 @@ IN: cuda.devices
     [ { CUdevice } ] dip '[ _ cuDeviceGet cuda-error ] with-out-parameters ;
 
 : enumerate-cuda-devices ( -- devices )
-    #cuda-devices iota [ n>cuda-device ] map ;
+    #cuda-devices <iota> [ n>cuda-device ] map ;
 
 : with-each-cuda-device ( quot -- )
     [ enumerate-cuda-devices ] dip '[ 0 _ with-cuda-context ] each ; inline
@@ -64,7 +64,7 @@ IN: cuda.devices
 : cuda. ( -- )
     init-cuda
     "CUDA Version: " write cuda-version number>string print nl
-    #cuda-devices iota [ nl ] [ cuda-device. ] interleave ;
+    #cuda-devices <iota> [ nl ] [ cuda-device. ] interleave ;
 
 : up/i ( x y -- z )
     [ 1 - + ] keep /i ; inline
index a5bf7e963210dd9fb6439978cc27804b24e0213b..93a10305327ee2811aa20746d962690cbda3b714 100644 (file)
@@ -3,7 +3,7 @@ USING: enigma kernel math sequences sorting tools.test ;
 
 IN: enigma.tests
 
-{ t } [ <reflector> natural-sort 26 iota sequence= ] unit-test
+{ t } [ <reflector> natural-sort 26 <iota> sequence= ] unit-test
 
 { "" } [ "" 4 <enigma> encode ] unit-test
 
index e70930a183999526dcc3077d5605c902792e3352..cc03fef19bde2bec0b13e84f89f09093bfc4c7ce 100644 (file)
@@ -7,13 +7,13 @@ sequences sequences.extras vectors ;
 IN: enigma
 
 : <alphabet> ( -- seq )
-    26 iota >array ;
+    26 <iota> >array ;
 
 : <cog> ( -- cog )
     <alphabet> randomize ;
 
 : <reflector> ( -- reflector )
-    <alphabet> dup length iota >vector [ dup empty? ] [
+    <alphabet> dup length <iota> >vector [ dup empty? ] [
         [
             [ delete-random ] [ delete-random ] bi
             pick exchange
@@ -40,7 +40,7 @@ TUPLE: enigma cogs prev-cogs reflector ;
             ln 1 + ln!
             cogs [ nth ] each reflector nth
             cogs reverse [ index ] each CHAR: a +
-            cogs length iota [ 6 * 1 + ln mod zero? ] filter
+            cogs length <iota> [ 6 * 1 + ln mod zero? ] filter
             cogs [ unclip prefix ] change-nths
         ] unless
     ] map ;
index c05f3488f1d5073b970d81d4d0dbdc77d16b76b9..86d8c50e16e9942929e9f24558eb271bd869cebf 100644 (file)
@@ -162,7 +162,7 @@ CONSTANT: box-vertices
       { {  1 -1 -1 } {  1  1 -1 } } }
 
 CONSTANT: cylinder-vertices
-    $[ 12 iota [ 2pi 12 / * [ cos ] [ drop 0.0 ] [ sin ] tri 3array ] map ]
+    $[ 12 <iota> [ 2pi 12 / * [ cos ] [ drop 0.0 ] [ sin ] tri 3array ] map ]
 
 :: scale-cylinder-vertices ( radius half-height verts -- bot-verts top-verts )
     verts
index a6992c25667734f0b289d7f7c49edf4ba4c8f268..fdf910dfae8fc4d660f9d655b2474c60a78abd4c 100644 (file)
@@ -88,7 +88,7 @@ TUPLE: joystick-demo-gadget < pack axis raxis controller buttons timer ;
     <axis-gadget> [ >>raxis ] [ add-gadget-with-border ] bi-curry bi* ;
 
 :: (add-button-gadgets) ( gadget shelf -- )
-    gadget controller>> read-controller buttons>> length iota [
+    gadget controller>> read-controller buttons>> length <iota> [
         number>string [ drop ] <border-button>
         shelf over add-gadget drop
     ] map gadget buttons<< ;
index 81143ecdd70824d5b78d2ebdede0c90afff33747..d173c46cc51b2ecc7ff9bd4e3732252006d60e21 100755 (executable)
@@ -239,7 +239,7 @@ DEFER: uniform-texture-accessors
         [ uniform-tuple-texture-accessors ] if
     ] [
         2dup swap empty? not and [
-            iota [
+            <iota> [
                 [ swap nth ] swap prefix
                 over length 1 = [ swap first append ] [ swap suffix ] if
             ] with map
@@ -398,7 +398,7 @@ DEFER: [bind-uniform-tuple]
         { mat4x3-uniform { [ dim 0 ] dip 4 3 >uniform-matrix-array glUniformMatrix4x3fv } }
         { mat4-uniform   { [ dim 0 ] dip 4 4 >uniform-matrix-array glUniformMatrix4fv   } }
 
-        { texture-uniform { drop dim dup iota [ texture-unit + ] int-array{ } map-as glUniform1iv } }
+        { texture-uniform { drop dim dup <iota> [ texture-unit + ] int-array{ } map-as glUniform1iv } }
     } at [ uniform invalid-uniform-type ] unless* >quotation :> value-quot
 
     type uniform-type-texture-units dim * texture-unit +
@@ -450,7 +450,7 @@ DEFER: [bind-uniform-tuple]
 :: [bind-uniform-struct] ( value>>-quot type texture-unit name dim -- texture-unit' quot )
     dim
     [
-        iota
+        <iota>
         [ [ [ swap nth ] swap prefix ] map ]
         [ [ number>string name "[" append "]." surround ] map ] bi
     ] [
index b677d1b763a4a0353310bc966c71f4b74948098a..942aa8f2b5247ac2b9a29d5072c09a94aaf2cc6b 100755 (executable)
@@ -392,7 +392,7 @@ M: vertex-array-object dispose
     '[ _ swap first2 bind-vertex-format ] each ; inline
 
 : (reset-vertex-array) ( -- )
-    GL_MAX_VERTEX_ATTRIBS get-gl-int iota [ glDisableVertexAttribArray ] each ; inline
+    GL_MAX_VERTEX_ATTRIBS get-gl-int <iota> [ glDisableVertexAttribArray ] each ; inline
 
 :: <multi-vertex-array-object> ( vertex-formats program-instance -- vertex-array )
     gen-vertex-array :> handle
index 47761386c3734a1a8340f54c489849c831a18457..396015e09e7a6ea8e8bf0f1d4da1059db9294d1b 100644 (file)
@@ -388,7 +388,7 @@ HELP: add-node
   { $example
     "USING: accessors graphviz prettyprint sequences ;"
     "<graph>"
-    "    5 iota [ add-node ] each"
+    "    5 <iota> [ add-node ] each"
     "statements>> [ id>> . ] each"
     "\"0\"\n\"1\"\n\"2\"\n\"3\"\n\"4\""
   }
@@ -612,7 +612,7 @@ $nl
 ""
 "        over number>string \"K \" prepend =label"
 ""
-"        swap iota 2 [ first2 add-edge ] each-combination"
+"        swap <iota> 2 [ first2 add-edge ] each-combination"
 "    preview ;"
 }
 $nl
@@ -637,7 +637,7 @@ $nl
 "    color <cluster>"
 "        color =color"
 "        [node color =color ];"
-"        n iota ["
+"        n <iota> ["
 "            number>string color prepend add-node"
 "        ] each ;"
 ""
@@ -674,7 +674,7 @@ $nl
 "graphviz graphviz.notation graphviz.render ;"
 ""
 ": add-cycle ( graph n -- graph' )"
-"    [ iota add-path ] [ 1 - 0 add-edge ] bi ;"
+"    [ <iota> add-path ] [ 1 - 0 add-edge ] bi ;"
 ""
 ": C_n ( n -- )"
 "    <graph>"
@@ -703,7 +703,7 @@ $nl
 "graphviz graphviz.notation graphviz.render ;"
 ""
 ": add-cycle ( graph n -- graph' )"
-"    [ iota add-path ] [ 1 - 0 add-edge ] bi ;"
+"    [ <iota> add-path ] [ 1 - 0 add-edge ] bi ;"
 ""
 ": W_n ( n -- )"
 "    <graph>"
@@ -712,7 +712,7 @@ $nl
 "        over number>string \"W \" prepend =label"
 "        over add-node"
 "        over 1 - add-cycle"
-"        swap [ ] [ 1 - iota >array ] bi add-edge"
+"        swap [ ] [ 1 - <iota> >array ] bi add-edge"
 "    preview ;"
 }
 $nl
@@ -788,7 +788,7 @@ $nl
 ""
 "    0 [add-node \"invis\" =style \"none\" =shape ];"
 ""
-"    16 iota ["
+"    16 <iota> ["
 "        [ 0 -- ] [ colored-circle add ] bi"
 "    ] each"
 "preview"
index d00d3ab0d98c46730024ea9e190b0111c40cefd8..b92938edeeb7d04f4213891d8c89c35a07bf1cdb 100644 (file)
@@ -58,13 +58,13 @@ SYMBOLS: supported-layouts supported-formats ;
     [node "point" =shape ];
     [graph "t" =labelloc "circo" =layout ];
     over number>string "K " prepend =label
-    swap iota 2 [ first2 add-edge ] each-combination ;
+    swap <iota> 2 [ first2 add-edge ] each-combination ;
 
 :: partite-set ( n color -- cluster )
     color <cluster>
         color =color
         [node color =color ];
-        n iota [
+        n <iota> [
             number>string color prepend add-node
         ] each ;
 
@@ -78,7 +78,7 @@ SYMBOLS: supported-layouts supported-formats ;
     n m "K %d,%d" sprintf =label ;
 
 : add-cycle ( graph n -- graph' )
-    [ iota add-path ] [ 1 - 0 add-edge ] bi ;
+    [ <iota> add-path ] [ 1 - 0 add-edge ] bi ;
 
 : C_n ( n -- graph )
     <graph>
@@ -94,7 +94,7 @@ SYMBOLS: supported-layouts supported-formats ;
     over number>string "W " prepend =label
     over add-node
     over 1 - add-cycle
-    swap [ ] [ 1 - iota >array ] bi add-edge ;
+    swap [ ] [ 1 - <iota> >array ] bi add-edge ;
 
 : cluster-example ( -- graph )
     <digraph>
@@ -138,7 +138,7 @@ SYMBOLS: supported-layouts supported-formats ;
           ""       =label ];
     [edge "invis" =style ];
     0 [add-node "invis" =style "none" =shape ];
-    16 iota [
+    16 <iota> [
         [ 0 -- ] [ colored-circle add ] bi
     ] each ;
 
index be790488efacc58bc7a261d3ed8cd2538047393f..a4e3a9fd7ae1a2f1df6e9acff9a38db6c3579eb7 100644 (file)
@@ -31,7 +31,7 @@ PRIVATE>
 : draw-grid-mesh ( grid-mesh -- )
     GL_ARRAY_BUFFER over buffer>> [
         [ 4 GL_FLOAT 0 f glVertexPointer ] dip
-        dup dim>> second iota [ draw-vertex-buffer-row ] with each
+        dup dim>> second <iota> [ draw-vertex-buffer-row ] with each
     ] with-gl-buffer ;
 
 : <grid-mesh> ( dim -- grid-mesh )
index 6033921587d9ec5066da330c275c8acac99e101f..7b386af4e17b26e6f0edd8f413b208032c62135c 100644 (file)
@@ -29,10 +29,10 @@ IN: grouping.extras
         { 2 V{ 6 7 8 } }
         { 3 V{ 9 } } }
 } [
-    10 iota [ 3 / floor ] group-by
+    10 <iota> [ 3 / floor ] group-by
 ] unit-test
 
 { V{ { t V{ 0 1 2 3 4 5 6 7 8 9 } } } }
-[ 10 iota [ drop t ] group-by ] unit-test
+[ 10 <iota> [ drop t ] group-by ] unit-test
 
 { V{ } } [ { } [ drop t ] group-by ] unit-test
index 9a2653152597739aabd93710fdfa5a37531c0d55..b564b9009ba1c0baa7b3623184d98c9eb71bad09 100644 (file)
@@ -21,7 +21,7 @@ IN: html.parser.analyzer
    [ <enum> >alist ] [ '[ second @ ] ] bi* filter ; inline
 
 : loopn-index ( n quot -- )
-    [ iota ] [ '[ @ not ] ] bi* find 2drop ; inline
+    [ <iota> ] [ '[ @ not ] ] bi* find 2drop ; inline
 
 : loopn ( n quot -- )
     [ drop ] prepose loopn-index ; inline
index bd5e9bb27d23558ed11995eb1e9f5f4c3ed55e5a..8168c96a00cd869c337f4f5db7accd163112a075 100644 (file)
@@ -43,4 +43,4 @@ IN: id3.tests
 
 
 { t }
-[ 10000 iota [ synchsafe>sequence sequence>synchsafe ] map [ < ] monotonic? ] unit-test
+[ 10000 <iota> [ synchsafe>sequence sequence>synchsafe ] map [ < ] monotonic? ] unit-test
index 8d03207cd59b631786025523780ce3d6174a95c5..3d0904c67a0c2b9b4093fbf19435af3023cf037b 100644 (file)
@@ -76,7 +76,7 @@ ERROR: atlas-image-formats-dont-match images ;
     image dim>> first2 :> ( w h )
     image-placement loc>> first2 :> ( x y )
 
-    h iota [| row |
+    h <iota> [| row |
         0  row      w  image pixel-row-slice-at
         x  y row +  w  atlas set-pixel-row-at
     ] each ; inline
index ae1b2582461c62c5979afc0a43005fe0e2b9a7cd..f0462df554606971bce32db9e9cb914af1384992 100644 (file)
@@ -37,7 +37,7 @@ SINGLETON: pbm-image
 :: read-binary-bits ( width height -- )
     width 8 align 8 / height * read
     width 8 align 8 / <groups> [| row |
-        width iota [| n |
+        width <iota> [| n |
             n 8 / floor row nth
             n 8 mod 7 swap - bit?
             [ 0 ] [ 255 ] if ,
index 918ea6885858740018af271c0ce92f622559d220..d40ce1f838595b2f1d25f64b58eed07302620265 100644 (file)
@@ -150,7 +150,7 @@ ERROR: bad-filter n ;
     prev width tail-slice :> b
     curr :> a
     curr width tail-slice :> x
-    x length iota
+    x length <iota>
     filter {
         { filter-none [ drop ] }
         { filter-sub [ [| n | n x nth n a nth + 256 wrap n x set-nth ] each ] }
index d0b4177d2389b14c0c3ff6b98850be8f1dc5dc3d..6e9d402af58a55da3d6a9bfeebd3a508252d8d30 100644 (file)
@@ -79,7 +79,7 @@ ERROR: bad-tga-unsupported ;
     41 read ascii decode [ 0 = ] trim ; inline
 
 : read-author-comments ( -- string )
-    4 iota [ drop 81 read ascii decode [ 0 = ] trim ] map concat ; inline
+    4 <iota> [ drop 81 read ascii decode [ 0 = ] trim ] map concat ; inline
 
 : read-date-timestamp ( -- timestamp )
     timestamp new
@@ -132,16 +132,16 @@ ERROR: bad-tga-unsupported ;
     1 read le> 4 = ; inline
 
 : read-scan-line-table ( height -- scan-offsets )
-    iota [ drop 4 read le> ] map ; inline
+    <iota> [ drop 4 read le> ] map ; inline
 
 : read-postage-stamp-image ( depth -- postage-data )
     8 align 8 / 1 read le> 1 read le> * * read ; inline
 
 :: read-color-correction-table ( -- correction-table )
-    256 iota
+    256 <iota>
     [
         drop
-        4 iota
+        4 <iota>
         [
             drop
             2 read le> 65535 /f :> alpha
@@ -153,7 +153,7 @@ ERROR: bad-tga-unsupported ;
     ] map ; inline
 
 : read-developer-directory ( -- developer-directory )
-    2 read le> iota
+    2 read le> <iota>
     [
         drop
         2 read le>
index d9a2fb6a1614a20269a3c3a60811b88f16c3df41..0d6ab019c7c2c0e80fc977c74f2df5fdf855d2ca 100644 (file)
@@ -115,7 +115,7 @@ IN: io.streams.peek.tests
 [
     [
         [
-            26 iota >byte-array <memory-stream> <peek-stream>
+            26 <iota> >byte-array <memory-stream> <peek-stream>
             4 over stream-peek ,
             6 over stream-peek ,
             2 over stream-read ,
index 7816907a7d882e54ebc936be96fd435314ab4ea5..36d53adfd80179728e5b4322a9125885931c3f85 100644 (file)
@@ -44,7 +44,7 @@ CONSTANT: wall-drawing-offset 0.15
 
 : equally-spaced-radians ( n -- seq )
     ! return a sequence of n numbers between 0 and 2pi
-    [ iota ] keep [ / pi 2 * * ] curry map ;
+    [ <iota> ] keep [ / pi 2 * * ] curry map ;
 
 : draw-segment-vertex ( segment theta -- )
     over color>> gl-color segment-vertex-and-normal
index e61286c10e2559f96c5c6db3a29dfc220b0c673f..da2b62dd7037eef345cc39bba201dbfd2c08fa41 100644 (file)
@@ -74,7 +74,7 @@ SYMBOL: terms
     [ > ] with count ;
 
 : inversions ( seq -- n )
-    0 swap [ length iota ] keep [
+    0 swap [ length <iota> ] keep [
         [ nth ] 2keep swap 1 + tail-slice (inversions) +
     ] curry each ;
 
@@ -142,12 +142,12 @@ DEFER: (d)
     [ dup length pick nth push ] reduce ;
 
 : nth-basis-elt ( generators n -- elt )
-    over length iota [
+    over length <iota> [
         3dup bit? [ nth ] [ 2drop f ] if
     ] map sift 2nip ;
 
 : basis ( generators -- seq )
-    natural-sort dup length 2^ iota [ nth-basis-elt ] with map ;
+    natural-sort dup length 2^ <iota> [ nth-basis-elt ] with map ;
 
 : (tensor) ( seq1 seq2 -- seq )
     [
@@ -177,7 +177,7 @@ DEFER: (d)
     dim-im/ker-d ;
 
 : graded-ker/im-d ( graded-basis -- seq )
-    [ length iota ] keep [ (graded-ker/im-d) ] curry map ;
+    [ length <iota> ] keep [ (graded-ker/im-d) ] curry map ;
 
 : graded-betti ( generators -- seq )
     basis graded graded-ker/im-d unzip but-last 0 prefix v- ;
@@ -189,8 +189,8 @@ DEFER: (d)
     dim-im/ker-d ;
 
 :: bigraded-ker/im-d ( basis -- seq )
-    basis length iota [| z |
-         basis first length iota [| u |
+    basis length <iota> [| z |
+         basis first length <iota> [| u |
             u z basis (bigraded-ker/im-d)
         ] map
     ] map ;
@@ -265,8 +265,8 @@ DEFER: (d)
     3array ;
 
 :: bigraded-triples ( grid -- triples )
-    grid length iota [| z |
-        grid first length iota [| u |
+    grid length <iota> [| z |
+        grid first length <iota> [| u |
             u z grid bigraded-triple
         ] map
     ] map ;
index 0056df046c8e223961c95cd73d601ba1b3fb19e1..63699ae93d9dcb77f22620c20dad8c3202274699 100644 (file)
@@ -17,7 +17,7 @@ IN: lcd
     '[ _ lcd-digit ] { } map-as concat ;
 
 : lcd ( digit-str -- string )
-    4 iota [ lcd-row ] with map "\n" join ;
+    4 <iota> [ lcd-row ] with map "\n" join ;
 
 : <time-display> ( model -- gadget )
     [ timestamp>hms lcd ] <arrow> <label-control>
index dee21564c2c077a8ea79a73b458b8af7ca8c042e..82ad5612079fd641e41e71e29a96ca1f070ed381 100644 (file)
@@ -29,7 +29,7 @@ CONSTANT: trivial-defs
     {
         [ ">" write ] [ "/>" write ] [ " " write ]
         [ 0 or + ]
-        [ dup length iota ]
+        [ dup length <iota> ]
         [ 0 swap copy ]
         [ dup length ]
         [ 0 swap ]
index 65157c7914b039bf7c67d82c876fa804874943bc..06f49bc0b6ede933750b407f05ee59d2905b9cf4 100644 (file)
@@ -892,7 +892,7 @@ TYPED: load-commands ( macho: mach_header_32/64 -- load-commands )
     [
         [ class-of heap-size ]
         [ >c-ptr <displaced-alien> ]
-        [ ncmds>> ] tri iota [
+        [ ncmds>> ] tri <iota> [
             drop read-command
         ] each drop
     ] { } make ;
index 3bca866ea30ee750265b639e73f01f28e89cdef2..4d4290a61ece8a6b81b5c684c1b620e9732342f0 100644 (file)
@@ -26,7 +26,7 @@ SYMBOL: current-git-id
     try-output-process ;
 
 : retry ( n quot -- )
-    [ iota ] dip
+    [ <iota> ] dip
     '[ drop @ f ] attempt-all drop ; inline
 
 : upload-process ( process -- )
index 368a1b756cda7bee3a322848158de859c163588e..8acda1801addb23ad521a30dfa5dd389a70c3fcf 100644 (file)
@@ -7,7 +7,7 @@ tools.test ;
 IN: math.extras.test
 
 { { 1 -1/2 1/6 0 -1/30 0 1/42 0 -1/30 0 } }
-[ 10 iota [ bernoulli ] map ] unit-test
+[ 10 <iota> [ bernoulli ] map ] unit-test
 
 { -1 } [ -1 7 jacobi ] unit-test
 { 0 } [ 3 3 jacobi ] unit-test
@@ -143,11 +143,11 @@ IN: math.extras.test
 { { 0 1 2 3 0 0 1 } } [ { 1 2 3 3 2 1 2 } [ <= ] monotonic-count ] unit-test
 { 4 } [ { 1 2 3 1 2 3 4 5 } [ < ] max-monotonic-count ] unit-test
 
-{ 2470 } [ 20 iota sum-squares ] unit-test
-{ 2470 } [ 20 iota >array sum-squares ] unit-test
+{ 2470 } [ 20 <iota> sum-squares ] unit-test
+{ 2470 } [ 20 <iota> >array sum-squares ] unit-test
 
-{ 36100 } [ 20 iota sum-cubes ] unit-test
-{ 36100 } [ 20 iota >array sum-cubes ] unit-test
+{ 36100 } [ 20 <iota> sum-cubes ] unit-test
+{ 36100 } [ 20 <iota> >array sum-cubes ] unit-test
 
 {
     {
index 1808e1c03106702e481a8ab7c204c4422ec833af..d2a49f6ee9430350464510c918d7101a749a4093 100644 (file)
@@ -34,7 +34,7 @@ DEFER: bernoulli
 <PRIVATE
 
 : (bernoulli) ( p -- n )
-    [ iota ] [ 1 + ] bi [
+    [ <iota> ] [ 1 + ] bi [
         0 [ [ nCk ] [ bernoulli * ] bi + ] with reduce
     ] keep recip neg * ;
 
@@ -119,13 +119,13 @@ PRIVATE>
 
 : bartlett ( n -- seq )
     dup 1 <= [ 1 = [ 1 1array ] [ { } ] if ] [
-        [ iota ] [ 1 - 2 / ] bi [
+        [ <iota> ] [ 1 - 2 / ] bi [
             [ recip * ] [ >= ] 2bi [ 2 swap - ] when
         ] curry map
     ] if ;
 
 : [0,2pi] ( n -- seq )
-    [ iota ] [ 1 - 2pi swap / ] bi v*n ;
+    [ <iota> ] [ 1 - 2pi swap / ] bi v*n ;
 
 : hanning ( n -- seq )
     dup 1 <= [ 1 = [ 1 1array ] [ { } ] if ] [
@@ -202,7 +202,7 @@ PRIVATE>
     unzip cum-sum [ last random ] [ bisect-left ] bi swap nth ;
 
 : unique-indices ( seq -- unique indices )
-    [ members ] keep over dup length iota H{ } zip-as '[ _ at ] map ;
+    [ members ] keep over dup length <iota> H{ } zip-as '[ _ at ] map ;
 
 : digitize] ( seq bins -- seq' )
     '[ _ bisect-left ] map ;
@@ -309,12 +309,12 @@ PRIVATE>
 
 GENERIC: sum-squares ( seq -- n )
 M: object sum-squares [ sq ] map-sum ;
-M: iota-tuple sum-squares
+M: iota sum-squares
     length 1 - [ ] [ 1 + ] [ 1/2 + ] tri * * 3 / ;
 
 GENERIC: sum-cubes ( seq -- n )
 M: object sum-cubes [ 3 ^ ] map-sum ;
-M: iota-tuple sum-cubes sum sq ;
+M: iota sum-cubes sum sq ;
 
 : mobius ( n -- x )
     group-factors values [ 1 ] [
index 9850e500337ef5408dac85bb19f26f2f6c0dd78f..039a42c25d3d3589950f2ab12284600f36466b11 100644 (file)
@@ -49,32 +49,32 @@ IN: math.factorials
 { t } [ 20 3 [ 1 factorial-power ] [ falling-factorial ] 2bi = ] unit-test
 { t } [ 20 3 [ 0 factorial-power ] [ ^ ] 2bi = ] unit-test
 
-{ { 1 2 6 30 210 2310 } } [ 6 iota [ primorial ] map ] unit-test
+{ { 1 2 6 30 210 2310 } } [ 6 <iota> [ primorial ] map ] unit-test
 
 { t } [
-    6 iota
+    6 <iota>
     [ [ double-factorial ] map ]
     [ [ 2 multifactorial ] map ]
     bi =
 ] unit-test
 
 { { 1 2 12 120 1680 30240 } }
-[ 6 iota [ quadruple-factorial ] map ] unit-test
+[ 6 <iota> [ quadruple-factorial ] map ] unit-test
 
-{ { 1 1 2 12 288 } } [ 5 iota [ super-factorial ] map ] unit-test
+{ { 1 1 2 12 288 } } [ 5 <iota> [ super-factorial ] map ] unit-test
 
-{ { 1 1 4 108 27648 } } [ 5 iota [ hyper-factorial ] map ] unit-test
+{ { 1 1 4 108 27648 } } [ 5 <iota> [ hyper-factorial ] map ] unit-test
 
 { { 1 1 1 5 19 101 619 4421 35899 326981 } }
-[ 10 iota [ alternating-factorial ] map ] unit-test
+[ 10 <iota> [ alternating-factorial ] map ] unit-test
 
-{ { 1 1 2 9 262144 } } [ 5 iota [ exponential-factorial ] map ] unit-test
+{ { 1 1 2 9 262144 } } [ 5 <iota> [ exponential-factorial ] map ] unit-test
 
 { V{ 2 3 5 7 23 719 5039 } }
-[ 10,000 iota [ factorial-prime? ] filter ] unit-test
+[ 10,000 <iota> [ factorial-prime? ] filter ] unit-test
 
 { V{ 3 5 7 29 31 211 2309 2311 } }
-[ 10,000 iota [ primorial-prime? ] filter ] unit-test
+[ 10,000 <iota> [ primorial-prime? ] filter ] unit-test
 
 { 10 } [ 3628800 reverse-factorial ] unit-test
 { 12 } [ 479001600 reverse-factorial ] unit-test
index 44e18b0829348c4acc29739c7805a2f75352acd8..ed2d4cae34dad1fd87ed0ec419ec1982decbb59a 100644 (file)
@@ -9,12 +9,12 @@ IN: math.finance.tests
 
 { { 2 4 } } [ { 1 3 5 } 2 sma ] unit-test
 
-{ { 2 3 4 5 } } [ 6 iota 2 dema ] unit-test
+{ { 2 3 4 5 } } [ 6 <iota> 2 dema ] unit-test
 
-{ t } [ 6 iota 2 [ dema ] [ 1 gdema ] 2bi = ] unit-test
+{ t } [ 6 <iota> 2 [ dema ] [ 1 gdema ] 2bi = ] unit-test
 
-{ { 3 4 5 } } [ 6 iota 2 tema ] unit-test
-{ { 6 7 8 9 } } [ 10 iota 3 tema ] unit-test
+{ { 3 4 5 } } [ 6 <iota> 2 tema ] unit-test
+{ { 6 7 8 9 } } [ 10 <iota> 3 tema ] unit-test
 
 { { 1 3 1 } } [ { 1 3 2 6 3 } 2 momentum ] unit-test
 
index 817fa89d9a9845bc1a2f5949f13aee3691d8c740..a38d152c68ab28545fb27015481930f78af5c342 100644 (file)
@@ -18,7 +18,7 @@ M: missing length seq>> length 1 - ;
 INSTANCE: missing immutable-sequence
 
 : first-sub-matrix ( matrix -- first-row seq )
-    [ unclip-slice swap ] [ length iota ] bi
+    [ unclip-slice swap ] [ length <iota> ] bi
     [ '[ _ <missing> ] map ] with map ;
 
 :: laplace-expansion ( row matrix -- x )
index 359e01fa5c03c1edaf49ef449f748377b1279f56..9801fc80f3570dc027b1ca15dd7a6de7fcb13abc 100644 (file)
@@ -2,6 +2,6 @@ USING: kernel math.primes sequences tools.test ;
 IN: math.primes.solovay-strassen
 
 { t } [
-    100,000 iota [ solovay-strassen ] filter
+    100,000 <iota> [ solovay-strassen ] filter
     100,000 primes-upto =
 ] unit-test
index 3daad08e6f29b61a45803be6a65ff206be986c38..ac4eb7076848f3bab65aa56023d920ee86986a1d 100644 (file)
@@ -9,7 +9,7 @@ IN: math.primes.solovay-strassen
 <PRIVATE
 
 :: (solovay-strassen) ( n numtrials -- ? )
-    numtrials iota [
+    numtrials <iota> [
         drop
         n 1 - [1,b) random :> a
         a n simple-gcd 1 > [ t ] [
index db8e87ae61c9bb1d64b349942f8f2cc65486461a..1352b34322819b58cea5a825aaa742a38a378e06 100644 (file)
@@ -55,7 +55,7 @@ PRIVATE>
     acc ;
 
 :: <cubic-hermite-curve> ( p0 m0 p1 m1 -- polynomials )
-    p0 length iota [
+    p0 length <iota> [
         {
             [ p0 nth ] [ m0 nth ]
             [ p1 nth ] [ m1 nth ]
index 523c927b885831f0f7d9b31d87e2d0af21d1a4d2..59c347d740f17f6e41da46bdb1e0b7c5369da628 100644 (file)
@@ -8,7 +8,7 @@ IN: math.splines.viewer
 <PRIVATE
 : eval-polynomials ( polynomials-seq n -- xy-sequence )
     [
-        [ 1 + iota ] keep [
+        [ 1 + <iota> ] keep [
             /f swap [ polyval ] with map
         ] curry with map
     ] curry map concat ;
index b887b55a5345fe405a7caf2624625721dd96dfe2..60e01003495f020191e4b9c2da7602f6d8fe9aed 100644 (file)
@@ -11,8 +11,8 @@ DEFER: (fft)
 ! Discrete Fourier Transform
 :: (slow-fft) ( seq inverse? -- seq' )
     seq length :> N
-    inverse? 1 -1 ? 2pi * N / N iota n*v :> omega
-    N iota [| k |
+    inverse? 1 -1 ? 2pi * N / N <iota> n*v :> omega
+    N <iota> [| k |
         0 seq omega [ k * cis * + ] 2each
         inverse? [ N / ] when
     ] map ; inline
index 2909d0b9e73f112f31cf7b64e93ba348b5263a81..74b3e0cd6ebd285f35358a08638af257c0d25988 100644 (file)
@@ -22,7 +22,7 @@ SYMBOL: total
 : canonicalize-specializer-1 ( specializer -- specializer' )
     [
         [ class? ] filter
-        [ length iota <reversed> [ 1 + neg ] map ] keep zip
+        [ length <iota> <reversed> [ 1 + neg ] map ] keep zip
         [ length args [ max ] change ] keep
     ]
     [
@@ -112,7 +112,7 @@ SYMBOL: total
     swap predicate-def append ;
 
 : multi-predicate ( classes -- quot )
-    dup length iota <reversed>
+    dup length <iota> <reversed>
     [ picker 2array ] 2map
     [ drop object eq? ] assoc-reject
     [ [ t ] ] [
index aa62a4391d78dda9e6be8f59d81c0b3f2cac47d1..922340baee697868370872dabcc3123b9be0f72d 100644 (file)
@@ -49,7 +49,7 @@ TYPED: normal-noise-map ( seed: integer dim -- bytes )
 ERROR: invalid-perlin-noise-table table ;
 
 : <perlin-noise-table> ( -- table )
-    256 iota >byte-array randomize dup append ; inline
+    256 <iota> >byte-array randomize dup append ; inline
 
 : validate-table ( table -- table )
     dup { [ byte-array? ] [ length 512 >= ] } 1&&
@@ -120,7 +120,7 @@ TYPED:: perlin-noise ( table: byte-array point: float-4 -- value: float )
     faded trilerp ;
 
 MEMO: perlin-noise-map-coords ( dim -- coords )
-    first2 iota [| x y | x iota [ y 0.0 0.0 float-4-boa ] float-4-array{ } map-as ] with map concat ;
+    first2 <iota> [| x y | x iota [ y 0.0 0.0 float-4-boa ] float-4-array{ } map-as ] with map concat ;
 
 TYPED:: perlin-noise-map ( table: byte-array transform: matrix4 coords: float-4-array -- map: float-array )
     coords [| coord | table transform coord m4.v perlin-noise ] data-map( float-4 -- c:float )
index 1b5a636914b2fe7aef1eb2eaa2dd9db3924b49ea..cc938ff20540cd0a51b4167df7d0f312c10ead6e 100644 (file)
@@ -31,7 +31,7 @@ TUPLE: nurbs-curve
     c1 c2 c3 c4 float-array{ } 4sequence ;
 
 : order-knot-constants ( curve order -- knot-constants )
-    2dup [ knots>> length ] dip - iota
+    2dup [ knots>> length ] dip - <iota>
     [ order-index-knot-constants ] 2with map ;
 
 : knot-constants ( curve -- knot-constants )
index 6b6c0a706ded0608b9b1ae06bebc6610b1fb74b6..ceb2e72b05786fc8b23ea1bbc2b8daf5f788a45f 100644 (file)
@@ -243,7 +243,7 @@ C: <field> field
 
 : odbc-get-row-fields ( statement -- seq )
     [
-        dup odbc-number-of-columns iota [
+        dup odbc-number-of-columns <iota> [
             1 + odbc-get-field value>> ,
         ] with each
     ] { } make ;
index e1a2a6661929fa2765f8fe0e87d0f446055e5225..5759c1b3ec55c8ac3ca3ed18eb143c0bb96781d7 100644 (file)
@@ -72,7 +72,7 @@ ERROR: pcre-error value ;
 
 : name-table-entries ( pcre extra -- addrs )
     [ name-table ] [ name-entry-size ] [ name-count ] 2tri
-    iota [ * + name-table-entry 2array ] 2with map ;
+    <iota> [ * + name-table-entry 2array ] 2with map ;
 
 : options ( pcre -- opts )
     f PCRE_INFO_OPTIONS pcre-fullinfo ;
index 51e8433c14f9026fbc010a1229292b2d9b741e68..217679ec01e7f44b4f7508f1575d68ea874c0f10 100644 (file)
@@ -368,7 +368,7 @@ DEFER: gamma
     x 0 <= [ "Invalid input" throw ] when
     x 12 < [ x gamma abs log ] [
         1.0 x x * / :> z
-        7 c nth 7 iota reverse [ [ z * ] [ c nth ] bi* + ] each x / :> series
+        7 c nth 7 <iota> reverse [ [ z * ] [ c nth ] bi* + ] each x / :> series
         x 0.5 - x log * x - halfLogTwoPi + series +
     ] if ;
 
@@ -411,7 +411,7 @@ CONSTANT: Q {
     0.0 :> num!
     1.0 :> den!
     y 1 - :> z!
-    8 iota [
+    8 <iota> [
         [ P nth num + z * num! ]
         [ Q nth den z * + den! ] bi
     ] each
index 5bf44eddc6ef1eb0ff164cec80d34f24d88593dd..1c6b100cda0e97a3dd3ccf71ab28aa7065a54f16 100644 (file)
@@ -47,14 +47,14 @@ PRIVATE>
 
 
 : euler001b ( -- answer )
-    1000 iota [ [ 5 mod ] [ 3 mod ] bi [ 0 = ] either? ] filter sum ;
+    1000 <iota> [ [ 5 mod ] [ 3 mod ] bi [ 0 = ] either? ] filter sum ;
 
 ! [ euler001b ] 100 ave-time
 ! 0 ms ave run time - 0.06 SD (100 trials)
 
 
 : euler001c ( -- answer )
-    1000 iota [ { 3 5 } [ divisor? ] with any? ] filter sum ;
+    1000 <iota> [ { 3 5 } [ divisor? ] with any? ] filter sum ;
 
 ! [ euler001c ] 100 ave-time
 ! 0 ms ave run time - 0.06 SD (100 trials)
index 241fc2b626355c7ff0f14387367225a3dd7164c3..1b554efa17b8ab79271249f41bd296b1b0950bec 100644 (file)
@@ -72,12 +72,12 @@ IN: project-euler.011
 
 : pad-front ( matrix -- matrix )
     [
-        length iota [ 0 <repetition> ] map
+        length <iota> [ 0 <repetition> ] map
     ] keep [ append ] 2map ;
 
 : pad-back ( matrix -- matrix )
     <reversed> [
-        length iota [ 0 <repetition> ] map
+        length <iota> [ 0 <repetition> ] map
     ] keep [ <reversed> append ] 2map ;
 
 : diagonal/ ( -- matrix )
index d95dc741eb8e459b3362004ed801235651d7bd39..627f6499ac1a3f189cd8b39f1b0c73de83f6d3a4 100644 (file)
@@ -24,7 +24,7 @@ IN: project-euler.024
 ! --------
 
 : euler024 ( -- answer )
-    999999 10 iota permutation digits>number ;
+    999999 10 <iota> permutation digits>number ;
 
 ! [ euler024 ] 100 ave-time
 ! 0 ms ave run time - 0.27 SD (100 trials)
index cd2620bc4f7d30dc2185c08ce9fd6f02db678ecf..6dda6a502b927f7ee1cf3aba2bb3586332313d6b 100644 (file)
@@ -46,7 +46,7 @@ IN: project-euler.027
 <PRIVATE
 
 : source-027 ( -- seq )
-    1000 iota [ prime? ] filter [ dup [ neg ] map append ] keep
+    1000 <iota> [ prime? ] filter [ dup [ neg ] map append ] keep
     cartesian-product concat [ first2 < ] filter ;
 
 : quadratic ( b a n -- m )
index 6db9707f7323385378927b03e6e727d1b20ecfc1..6c7dbd9d87d1de4fb3ce78873fc352525637adcd 100644 (file)
@@ -38,7 +38,7 @@ IN: project-euler.030
 PRIVATE>
 
 : euler030 ( -- answer )
-    325537 iota [ dup sum-fifth-powers = ] filter sum 1 - ;
+    325537 <iota> [ dup sum-fifth-powers = ] filter sum 1 - ;
 
 ! [ euler030 ] 100 ave-time
 ! 1700 ms ave run time - 64.84 SD (100 trials)
index 00de5e1a8543deb856a677d94ac3d1ffb3b79a19..ff1824463bad6be77df28ff5cc4c625e1956b1f9 100644 (file)
@@ -27,8 +27,8 @@ IN: project-euler.032
 <PRIVATE
 
 : source-032 ( -- seq )
-    9 factorial iota [
-        9 iota permutation [ 1 + ] map digits>number
+    9 factorial <iota> [
+        9 <iota> permutation [ 1 + ] map digits>number
     ] map ;
 
 : 1and4 ( n -- ? )
index 985c53f745dd2146dd1674f7a5582c22b0a68dcf..79f4cfce6beb1a7449710e242036b1c2b3bafbbf 100644 (file)
@@ -82,7 +82,7 @@ PRIVATE>
     [ unclip 1 head prefix concat ] map [ all-unique? ] filter ;
 
 : add-missing-digit ( seq -- seq )
-    dup natural-sort 10 iota swap diff prepend ;
+    dup natural-sort 10 <iota> swap diff prepend ;
 
 : interesting-pandigitals ( -- seq )
     17 candidates { 13 11 7 5 3 2 } [
index ae603c81fd498bf4f1e96c2139bc231b476e4cfd..9fc2fac588ea539be5d08dae9b38b8bbc270a018 100644 (file)
@@ -24,7 +24,7 @@ IN: project-euler.052
 <PRIVATE
 
 : map-nx ( n x -- seq )
-    iota [ 1 + * ] with map ; inline
+    <iota> [ 1 + * ] with map ; inline
 
 : all-same-digits? ( seq -- ? )
     [ number>digits natural-sort ] map all-equal? ;
index 2e2d31740192e3df3f9181cd66a1f5b79732de2e..3e6d6c386d6d8a40d97f990de95eaa883d66ddb1 100644 (file)
@@ -27,7 +27,7 @@ IN: project-euler.053
 ! --------
 
 : euler053 ( -- answer )
-    23 100 [a,b] [ dup iota [ nCk 1000000 > ] with count ] map-sum ;
+    23 100 [a,b] [ dup <iota> [ nCk 1000000 > ] with count ] map-sum ;
 
 ! [ euler053 ] 100 ave-time
 ! 52 ms ave run time - 4.44 SD (100 trials)
index 586d76b957d537a04826fbe76ab4a53ca881668b..a523d6b696753f9bd3b55918be2824c53cd7edc5 100644 (file)
@@ -61,7 +61,7 @@ IN: project-euler.055
 PRIVATE>
 
 : euler055 ( -- answer )
-    10000 iota [ lychrel? ] count ;
+    10000 <iota> [ lychrel? ] count ;
 
 ! [ euler055 ] 100 ave-time
 ! 478 ms ave run time - 30.63 SD (100 trials)
index 4e35c9da58b2358bad80ef72099adae145857489..2850881ac52fa7602bf673c9f130b02a8b6cb555 100644 (file)
@@ -36,7 +36,7 @@ IN: project-euler.057
     >fraction [ number>string length ] bi@ > ; inline
 
 : euler057 ( -- answer )
-    0 1000 iota [ drop 2 + recip dup 1 + longer-numerator? ] count nip ;
+    0 1000 <iota> [ drop 2 + recip dup 1 + longer-numerator? ] count nip ;
 
 ! [ euler057 ] 100 ave-time
 ! 1728 ms ave run time - 80.81 SD (100 trials)
index 1c858e63de3996d0e6812a13a9c2c3848fae9b6c..d3776ef1d474807aa9f1cf743d8a86632f580077 100644 (file)
@@ -60,7 +60,7 @@ IN: project-euler.081
     3dup minimal-path-sum-to '[ _ + ] change-matrix ;
 
 : (euler081) ( matrix -- n )
-    dup first length iota dup
+    dup first length <iota> dup
     [ pick update-minimal-path-sum ] cartesian-each
     last last ;
 
index c31b2b3e2a4f7a3d065bcf2b530eb340400f0dbd..0addaf6d1b977709b54bf291414c6614ee5ec78a 100644 (file)
@@ -52,9 +52,9 @@ IN: project-euler.150
 
 :: (euler150) ( m -- n )
     sums-triangle :> table
-    m iota [| x |
-        x 1 + iota [| y |
-            m x - iota [| z |
+    m <iota> [| x |
+        x 1 + <iota> [| y |
+            m x - <iota> [| z |
                 x z + table nth-unsafe
                 [ y z + 1 + swap nth-unsafe ]
                 [ y         swap nth-unsafe ] bi -
index 1c5ee22b75a6221544804f387b281bfcdf0e42bd..6b20511d607a5f4e72108a5149be6d028199da22 100644 (file)
@@ -62,7 +62,7 @@ DEFER: (euler151)
         { { 0 0 1 0 } [ { 0 0 0 1 } (euler151) 1 + ] }
         { { 0 1 0 0 } [ { 0 0 1 1 } (euler151) 1 + ] }
         { { 1 0 0 0 } [ { 0 1 1 1 } (euler151) 1 + ] }
-        [ [ dup length iota [ pick-sheet ] with map-sum ] [ sum ] bi / ]
+        [ [ dup length <iota> [ pick-sheet ] with map-sum ] [ sum ] bi / ]
      } case ] cache ;
 
 : euler151 ( -- answer )
index be5d40df9b92aefd9405ab47c8fa0e6a1f5003bd..6b881cb5689bb22499dcfa2b5f864c2a4cf14d03 100644 (file)
@@ -18,7 +18,7 @@ IN: project-euler.164
 <PRIVATE
 
 : next-keys ( key -- keys )
-    [ last ] [ 10 swap sum - iota ] bi [ 2array ] with map ;
+    [ last ] [ 10 swap sum - <iota> ] bi [ 2array ] with map ;
 
 : next-table ( assoc -- assoc )
     H{ } clone swap
index 261a9e8ff20b5167c33039d9990da895a8c706a9..3a527c9d428a34238b3d9c66aad1494b1f4d3fa3 100644 (file)
@@ -28,7 +28,7 @@ IN: project-euler.265
 CONSTANT: N 5
 
 : decompose ( n -- seq )
-    N iota [ drop [ 2/ ] [ 1 bitand ] bi ] map nip reverse ;
+    N <iota> [ drop [ 2/ ] [ 1 bitand ] bi ] map nip reverse ;
 
 : bits ( seq -- n )
     0 [ [ 2 * ] [ + ] bi* ] reduce ;
@@ -37,7 +37,7 @@ CONSTANT: N 5
     unclip decompose append [ 1 bitand ] map ;
 
 : rotate-bits ( seq -- seq' )
-    dup length iota [ cut prepend bits ] with map ;
+    dup length <iota> [ cut prepend bits ] with map ;
 
 : ?register ( acc seq -- )
     complete rotate-bits
index 4b4548e8191bb4e780700d109e59d338f88d6e9a..d3248a9dfcbf43113795bb44717c242121a58214 100644 (file)
@@ -48,7 +48,7 @@ IN: project-euler.common
 HINTS: count-digits fixnum ;
 
 : max-children ( seq -- seq )
-    [ dup length 1 - iota [ nth-pair max , ] with each ] { } make ;
+    [ dup length 1 - <iota> [ nth-pair max , ] with each ] { } make ;
 
 ! Propagate one row into the upper one
 : propagate ( bottom top -- newtop )
index e1a072bb6e92f22fe2c740f8ee2f66f21a1f9f5b..d6371151f9bf7b8399e09d0942975a9509b52ec1 100644 (file)
@@ -14,7 +14,7 @@ HELP: >py
 { $examples
   { $example
     "USING: arrays prettyprint python sequences ;"
-    "10 iota >array >py py> ."
+    "10 <iota> >array >py py> ."
     "{ 0 1 2 3 4 5 6 7 8 9 }"
   }
 }
index 42c2a48b54af350e9225beef9e73241f9d061378..88bceafaf5fc6ea80f84168d9391a3e2755f28f4 100644 (file)
@@ -54,10 +54,10 @@ SPECIALIZED-ARRAY: void*
     [ rot py-list-set-item ] with each-index ;
 
 : py-tuple>array ( py-tuple -- arr )
-    dup py-tuple-size iota [ py-tuple-get-item ] with map ;
+    dup py-tuple-size <iota> [ py-tuple-get-item ] with map ;
 
 : py-list>vector ( py-list -- vector )
-    dup py-list-size iota [ py-list-get-item ] with V{ } map-as ;
+    dup py-list-size <iota> [ py-list-get-item ] with V{ } map-as ;
 
 DEFER: >py
 
index 27bdb3245fc166039187045a6a8e47638c7352df..ad25ee0054b81007eea3655f2f7b99313b440723 100644 (file)
@@ -26,18 +26,18 @@ IN: random.cmwc.tests
 }
 } [
     cmwc-4096
-    4096 iota uint >c-array 362436 <cmwc-seed> seed-random [
+    4096 <iota> uint >c-array 362436 <cmwc-seed> seed-random [
         10 [ random-32 ] replicate
     ] with-random
 ] unit-test
 
 { t } [
     cmwc-4096 [
-        4096 iota uint >c-array 362436 <cmwc-seed> seed-random [
+        4096 <iota> uint >c-array 362436 <cmwc-seed> seed-random [
             10 [ random-32 ] replicate
         ] with-random
     ] [
-        4096 iota uint >c-array 362436 <cmwc-seed> seed-random [
+        4096 <iota> uint >c-array 362436 <cmwc-seed> seed-random [
             10 [ random-32 ] replicate
         ] with-random
     ] bi =
index e65a13aab7f72ae9f637ef2ee752167c636217ea..a38828114ece4bfe116e301bab9b8a1a0e4d5576 100644 (file)
@@ -20,7 +20,7 @@ IN: rosetta-code.bitmap-bezier
 
 ! gives an interval of x from 0 to 1 to map the bezier function
 : t-interval ( x -- interval )
-    [ iota ] keep 1 - [ / ] curry map ;
+    [ <iota> ] keep 1 - [ / ] curry map ;
 
 ! turns a list of points into the list of lines between them
 : points-to-lines ( seq -- seq )
index 940eb4e3b64dcb64a1a630bf259dc911ff466fd8..55f54c0f5adbd13c3eaa3cf319228a2c25f3929b 100644 (file)
@@ -63,5 +63,5 @@ M:: bounty <=> ( a b -- <=> )
     ] 2map ;
 
 : best-bounty ( -- bounty )
-    find-max-amounts [ 1 + iota ] map <product-sequence>
+    find-max-amounts [ 1 + <iota> ] map <product-sequence>
     [ <bounty> ] [ max ] map-reduce ;
index 4f989c29380a2f4a0315d57aad9714eb0554d79b..a33034459965aeb1e2cf2f05f67fc560c99e98b9 100644 (file)
@@ -72,13 +72,13 @@ CONSTANT: limit 400
     ] each ;
 
 : fill-table ( table -- )
-    [ items length iota ] dip
+    [ items length <iota> ] dip
     '[ _ iterate ] each ;
 
 :: extract-packed-items ( table -- items )
     [
         limit :> weight!
-        items length iota <reversed> [| item-no |
+        items length <iota> <reversed> [| item-no |
             item-no table nth :> prev
             item-no 1 + table nth :> curr
             weight [ curr nth ] [ prev nth ] bi =
index 2b3c752f54bd152cf60aaa3cbd2e2c8801e10932..e9d313f2ddfb56bd454ca4a0e99655ad8a13813f 100644 (file)
@@ -19,7 +19,7 @@ IN: rosetta-code.long-multiplication
 
 : longmult-seq ( xs ys -- zs )
     [ * ] cartesian-map
-    dup length iota [ 0 <repetition> ] map
+    dup length <iota> [ 0 <repetition> ] map
     [ prepend ] 2map
     [ ] [ [ 0 suffix ] dip v+ ] map-reduce ;
 
index a25d1ca80fe0c1889126499676584b0855b753b6..e0af49231cfadfdf24f359187a62bd13bb2582ff 100644 (file)
@@ -61,7 +61,7 @@ IN: rosetta-code.luhn-test
     while drop ;
 
 : luhn-digit  ( n -- n )
-    reversed-digits dup length iota [
+    reversed-digits dup length <iota> [
         2dup swap nth
         swap odd? [ 2 *  10 /mod + ] when
     ] map sum 10 mod
index 8b26a812c5d8fc2c27e804dc6cef399ba61e5840..1fcc64799177a2f92f7f1064b64d0b9b1593d690 100644 (file)
@@ -10,7 +10,7 @@ IN: rosetta-code.n-queens
 
 :: safe?  ( board q -- ? )
     [let q board nth :> x
-      q iota [
+      q <iota> [
          x swap
          [ board nth ] keep
          q swap -
@@ -20,10 +20,10 @@ IN: rosetta-code.n-queens
     ] ;
 
 : solution? ( board -- ? )
-    dup length iota [ dupd safe? ] all? nip ;
+    dup length <iota> [ dupd safe? ] all? nip ;
 
 : queens ( n -- l )
-    iota all-permutations [ solution? ] filter ;
+    <iota> all-permutations [ solution? ] filter ;
 
 : queens. ( n -- )
     queens [ [ 1 + "%d " printf ] each nl ] each ;
index 405b1924bd0913f63d571813896865acc9f53f16..ed61fb912c28330cd67621177dbd8ef1e9777aa4 100644 (file)
@@ -33,7 +33,7 @@ IN: rosetta-code.one-d-cellular
     index [ 1 - ] [ 1 + ] bi [ world ?nth ] bi@ bool-sum ;
 
 : count-neighbours ( world -- neighbours )
-    [ length iota ] keep [ neighbours ] curry map ;
+    [ length <iota> ] keep [ neighbours ] curry map ;
 
 : life-law ( alive? neighbours -- alive? )
     swap [ 1 = ] [ 2 = ] if ;
index a8eed85a1e353a83f3e882f1d497be3ff3eb7306..06cfdd3fd42b0381682aa5f0c0b4d209211eed40 100644 (file)
@@ -35,7 +35,7 @@ IN: sequences.extras.tests
         "--ABC--"
     }
 } [
-    "ABC" 8 iota [ CHAR: - pad-center ] with map
+    "ABC" 8 <iota> [ CHAR: - pad-center ] with map
 ] unit-test
 
 { { 0 1 0 1 } } [
@@ -103,7 +103,7 @@ IN: sequences.extras.tests
 { "lohel" } [ "hello" dup -12 rotate! ] unit-test
 
 { { } } [ { } [ ] map-concat ] unit-test
-{ V{ 0 0 1 0 1 2 } } [ 4 iota [ iota ] map-concat ] unit-test
+{ V{ 0 0 1 0 1 2 } } [ 4 <iota> [ iota ] map-concat ] unit-test
 { "abc" } [ "abc" [ 1string ] map-concat ] unit-test
 { "abc" } [ { 97 98 99 } [ 1string ] map-concat ] unit-test
 { { 97 98 99 } } [ "abc" [ 1string ] { } map-concat-as ] unit-test
@@ -112,12 +112,12 @@ IN: sequences.extras.tests
 
 { { } } [ { } [ ] [ even? ] map-filter ] unit-test
 { "bcde" } [ "abcd" [ 1 + ] [ drop t ] map-filter ] unit-test
-{ { 0 4 16 36 64 } } [ 10 iota [ sq ] [ even? ] { } map-filter-as ] unit-test
+{ { 0 4 16 36 64 } } [ 10 <iota> [ sq ] [ even? ] { } map-filter-as ] unit-test
 
-{ V{ 0 4 16 36 64 } } [ 10 iota [ even? ] [ sq ] filter-map ] unit-test
-{ { 2 6 10 14 18 } } [ 10 iota [ odd? ] [ 2 * ] { } filter-map-as ] unit-test
+{ V{ 0 4 16 36 64 } } [ 10 <iota> [ even? ] [ sq ] filter-map ] unit-test
+{ { 2 6 10 14 18 } } [ 10 <iota> [ odd? ] [ 2 * ] { } filter-map-as ] unit-test
 
-{ 8 } [ 3 iota dup [ 1 + * ] 2map-sum ] unit-test
+{ 8 } [ 3 <iota> dup [ 1 + * ] 2map-sum ] unit-test
 { 4 } [ "hello" "jello" [ = ] 2count ] unit-test
 
 { { } } [ { } round-robin ] unit-test
@@ -149,12 +149,12 @@ IN: sequences.extras.tests
 { { { 5 8 0 } { 6 9 1 } { 7 10 2 } } } [ { 5 6 7 } { 8 9 10 } [ 3array ] 2map-index ] unit-test
 
 { { } } [ { } <evens> >array ] unit-test
-{ { 0 2 } } [ 4 iota <evens> >array ] unit-test
-{ { 0 2 4 } } [ 5 iota <evens> >array ] unit-test
+{ { 0 2 } } [ 4 <iota> <evens> >array ] unit-test
+{ { 0 2 4 } } [ 5 <iota> <evens> >array ] unit-test
 
 { { } } [ { } <odds> >array ] unit-test
-{ { 1 3 } } [ 5 iota <odds> >array ] unit-test
-{ { 1 3 5 } } [ 6 iota <odds> >array ] unit-test
+{ { 1 3 } } [ 5 <iota> <odds> >array ] unit-test
+{ { 1 3 5 } } [ 6 <iota> <odds> >array ] unit-test
 
 { 1 } [ { 1 7 3 7 6 3 7 } arg-max ] unit-test
 { 0 } [ { 1 7 3 7 6 3 7 } arg-min ] unit-test
@@ -204,8 +204,8 @@ IN: sequences.extras.tests
 { { 1 2 3 } } [ { 1 2 3 } flatten1 ] unit-test
 { { 1 2 3 { { 4 } } } } [ { 1 { 2 } { 3 { { 4 } } } } flatten1 ] unit-test
 
-{ t 3 3 } [ 10 iota [ [ odd? ] [ 1 > ] bi* and ] map-find-index ] unit-test
-{ f f f } [ 10 iota [ [ odd? ] [ 9 > ] bi* and ] map-find-index ] unit-test
+{ t 3 3 } [ 10 <iota> [ [ odd? ] [ 1 > ] bi* and ] map-find-index ] unit-test
+{ f f f } [ 10 <iota> [ [ odd? ] [ 9 > ] bi* and ] map-find-index ] unit-test
 
 { "abcdef" } [ f f "abcdef" subseq* ] unit-test
 { "abcdef" } [ 0 f "abcdef" subseq* ] unit-test
@@ -218,13 +218,13 @@ IN: sequences.extras.tests
 { "" " foo" } [ " foo" [ blank? ] cut-when ] unit-test
 { "foo" " bar" } [ "foo bar" [ blank? ] cut-when ] unit-test
 
-{ { 4 0 3 1 2 } } [ { 0 4 1 3 2 } 5 iota [ nth* ] curry map ] unit-test
+{ { 4 0 3 1 2 } } [ { 0 4 1 3 2 } 5 <iota> [ nth* ] curry map ] unit-test
 
 { 1 "beef" } [ { "chicken" "beef" "moose" } [ length ] infimum-by* ] unit-test
 { 0 "chicken" } [ { "chicken" "beef" "moose" } [ length ] supremum-by* ] unit-test
 { 2 "moose" } [ { "chicken" "beef" "moose" } [ first ] supremum-by* ] unit-test
 
-{ 3/10 } [ 10 iota [ 3 < ] count* ] unit-test
+{ 3/10 } [ 10 <iota> [ 3 < ] count* ] unit-test
 
 { { 0 } } [ "ABA" "ABABA" start-all ] unit-test
 { { 0 2 } } [ "ABA" "ABABA" start-all* ] unit-test
@@ -245,10 +245,10 @@ IN: sequences.extras.tests
 { }
 [ "test:" all-words [ name>> over prepend ] map-zip 2drop ] unit-test
 
-{ { 0 1 2 3 } } [ 8 iota [ 4 < ] take-while >array ] unit-test
+{ { 0 1 2 3 } } [ 8 <iota> [ 4 < ] take-while >array ] unit-test
 { { } } [ { 15 16 } [ 4 < ] take-while >array ] unit-test
-{ { 0 1 2 } } [ 3 iota [ 4 < ] take-while >array ] unit-test
+{ { 0 1 2 } } [ 3 <iota> [ 4 < ] take-while >array ] unit-test
 
-{ { 4 5 6 7 } } [ 8 iota [ 4 < ] drop-while >array ] unit-test
+{ { 4 5 6 7 } } [ 8 <iota> [ 4 < ] drop-while >array ] unit-test
 { { 15 16 } } [ { 15 16 } [ 4 < ] drop-while >array ] unit-test
-{ { } } [ 3 iota [ 4 < ] drop-while >array ] unit-test
+{ { } } [ 3 <iota> [ 4 < ] drop-while >array ] unit-test
index 4cb2536f7c388a099fa318a2c92c74c59fe2e84a..0832d15a46248e67b95a79f71dcdebab08eb7558 100644 (file)
@@ -207,7 +207,7 @@ ERROR: underlying-mismatch slice1 slice2 ;
     ] until 3drop ;
 
 : all-rotations ( seq -- seq' )
-    dup length iota [ rotate ] with map ;
+    dup length <iota> [ rotate ] with map ;
 
 <PRIVATE
 
@@ -295,7 +295,7 @@ PRIVATE>
 
 : round-robin ( seq -- newseq )
     [ { } ] [
-        [ longest length iota ] keep
+        [ longest length <iota> ] keep
         [ [ ?nth ] with map ] curry map concat sift
     ] if-empty ;
 
index eb38af94697a25305edb50a27c9461af2dbd2495..dd7bc0b555735213809069fbcd5ed818e7142c2d 100644 (file)
@@ -23,4 +23,4 @@ M: rotated virtual-exemplar seq>> ;
 INSTANCE: rotated virtual-sequence
 
 : all-rotations ( seq -- seq' )
-    dup length iota [ <rotated> ] with map ;
+    dup length <iota> [ <rotated> ] with map ;
index a25a2b883fe9f67d9bd94a5e9b8f975501077f3e..9ae89e9dbe06666f6db3efa5a947ded4d5a747cb 100644 (file)
@@ -3,8 +3,8 @@
 USING: arrays sequences tools.test ;
 IN: sequences.shifted
 
-{ { 1 2 3 7 } } [ 4 iota -1 7 <shifted> >array ] unit-test
-{ { 7 0 1 2 } } [ 4 iota 1 7 <shifted> >array ] unit-test
-{ { 0 1 2 3 } } [ 4 iota 0 f <shifted> >array ] unit-test
-{ { f f f f } } [ 4 iota 4 f <shifted> >array ] unit-test
-{ { f f f f } } [ 4 iota -4 f <shifted> >array ] unit-test
+{ { 1 2 3 7 } } [ 4 <iota> -1 7 <shifted> >array ] unit-test
+{ { 7 0 1 2 } } [ 4 <iota> 1 7 <shifted> >array ] unit-test
+{ { 0 1 2 3 } } [ 4 <iota> 0 f <shifted> >array ] unit-test
+{ { f f f f } } [ 4 <iota> 4 f <shifted> >array ] unit-test
+{ { f f f f } } [ 4 <iota> -4 f <shifted> >array ] unit-test
index 49eb46e911c72c588f6fdf96610b4fe348a0bdd9..3d3af20793930452ad3afb38f29f4329c2d4584d 100644 (file)
@@ -3,7 +3,7 @@
 USING: arrays sequences tools.test ;
 IN: sequences.snipped
 
-{ { 0 1 2 5 6 } } [ 3 5 7 iota <snipped> >array ] unit-test
-{ { 0 1 2 } } [ 3 10 7 iota <snipped> >array ] unit-test
-{ { 6 } } [ -1 5 7 iota <snipped> >array ] unit-test
-{ { } } [ -1 10 7 iota <snipped> >array ] unit-test
+{ { 0 1 2 5 6 } } [ 3 5 7 <iota> <snipped> >array ] unit-test
+{ { 0 1 2 } } [ 3 10 7 <iota> <snipped> >array ] unit-test
+{ { 6 } } [ -1 5 7 <iota> <snipped> >array ] unit-test
+{ { } } [ -1 10 7 <iota> <snipped> >array ] unit-test
index a33d88d231e563d1e3aedc04e1032a66a823f3e6..15455670138a94e23c49a603b2695a3060df802f 100644 (file)
@@ -23,6 +23,6 @@ IN: sets.extras.tests
 { "abc" } [ "abcddd" non-repeating ] unit-test
 { "" } [ "aabbcc" non-repeating ] unit-test
 
-{ HS{ 0 10 20 30 40 } } [ 5 iota [ 10 * ] mapped-set ] unit-test
+{ HS{ 0 10 20 30 40 } } [ 5 <iota> [ 10 * ] mapped-set ] unit-test
 
 { { 1 2 4 } } [ { 1 2 3 4 5 } [ 2/ ] unique-by ] unit-test
index f8f01b89ae1bdddbd80bcac9b1930407cfe64928..70fdd9597c17dc8b9cf8ac12023ff1b78d56c9e6 100644 (file)
@@ -49,7 +49,7 @@ C: <snake-part> snake-part
     opposite-dir prefix [ >>dir ] 2map ;
 
 : all-indices ( -- points )
-    snake-game-dim first2 * iota ;
+    snake-game-dim first2 * <iota> ;
 
 : snake-occupied-locs ( snake head-loc -- points )
     [ dir>> relative-loc ] accumulate nip ;
index cac3e339608e22d3a9ed67e4d6c8caf952ec0e43..6af031bddeabf67a441bf4dc5a3bfc34c4041637 100644 (file)
@@ -13,7 +13,7 @@ IN: snake-game.sprites
 
 :: image-part ( image x y w h -- image )
     image w h new-image-like :> new-image
-    h iota [| i |
+    h <iota> [| i |
         new-image bitmap>>
         x y i + w image pixel-row-slice-at
         append! drop
@@ -22,8 +22,8 @@ IN: snake-game.sprites
 :: generate-sprite-sheet ( image rows cols -- seq )
     cols rows 2array :> split-dims
     image dim>> split-dims [ / ] 2map first2 :> ( sw sh )
-    rows iota sh v*n :> ys
-    cols iota sh v*n :> xs
+    rows <iota> sh v*n :> ys
+    cols <iota> sh v*n :> xs
     ys xs [
         swap [ image ] 2dip sw sh image-part
     ] cartesian-map f join ;
index d4b9c20e9f493c3ea62efcff8add8cac6deaae8a..b15b2849a2b95ff9fedb0239c648643f37a8db4a 100644 (file)
@@ -22,12 +22,12 @@ IN: sorting.extras
 
 { { 0 1 2 3 4 5 6 7 8 9 } } [
     { }
-    10 iota >array randomize
+    10 <iota> >array randomize
     [ swap insort-right ] each
 ] unit-test
 
 { V{ 0 1 2 3 4 5 6 7 8 9 } } [
     V{ } clone
-    10 iota >array randomize
+    10 <iota> >array randomize
     [ swap insort-right! ] each
 ] unit-test
index c6ae64c7f1a98a76d9f3efbddfbcc41897cd9a5b..fd385162c592ccf4007ad794c30741d4ff000859 100755 (executable)
@@ -322,7 +322,7 @@ CONSTANT: red   { 255   0   0 }
     plot-bitmap-pixel ;
 
 : do-bitmap-update ( bitmap value addr -- )
-    addr>xy swap 8 iota [ plot-bitmap-bits ] with with with each ;
+    addr>xy swap 8 <iota> [ plot-bitmap-bits ] with with with each ;
 
 M: space-invaders update-video
     over 0x2400 >= [
index 22b6024db9569cb77544c5dcb1cfdcb032cb610d..78e5b20a310005a9dffce418a9d0a27610fd9057 100644 (file)
@@ -9,7 +9,7 @@ IN: spelling
 CONSTANT: ALPHABET "abcdefghijklmnopqrstuvwxyz"
 
 : deletes ( word -- edits )
-    [ length iota ] keep '[ _ remove-nth ] map ;
+    [ length <iota> ] keep '[ _ remove-nth ] map ;
 
 : transposes ( word -- edits )
     [ length [1,b) ] keep '[
@@ -17,7 +17,7 @@ CONSTANT: ALPHABET "abcdefghijklmnopqrstuvwxyz"
     ] map ;
 
 : replaces ( word -- edits )
-    [ length iota ] keep '[
+    [ length <iota> ] keep '[
         ALPHABET [
             swap _ clone [ set-nth-unsafe ] keep
         ] with { } map-as
index 47ab274cd1ae2458aee760ff1237818280882f8a..9f8453b9e4aeb018ca95b60979f59095dd18118a 100644 (file)
@@ -17,7 +17,7 @@ SYMBOL: board
 : cell-any? ( n x y i -- ? ) 3 /mod pair+ board> = ;
 
 : box-any? ( n x y -- ? )
-    [ 3 /i 3 * ] bi@ 9 iota [ cell-any? ] 3 nwith any? ;
+    [ 3 /i 3 * ] bi@ 9 <iota> [ cell-any? ] 3 nwith any? ;
 
 : board-any? ( n x y -- ? )
     { [ nip row-any? ] [ drop col-any? ] [ box-any? ] } 3|| ;
index 8d1299042a2c3fcbae3304bf700b612a734b4076..da591bc3140dd566d53591889bf3e8a99cb6b563 100755 (executable)
@@ -4,7 +4,7 @@ USING: accessors kernel locals math math.constants math.functions memoize openal
 IN: synth
 
 MEMO: single-sine-wave ( samples/wave -- seq )
-    [ iota ] [ pi 2 * swap / [ * sin ] curry ] bi map ;
+    [ <iota> ] [ pi 2 * swap / [ * sin ] curry ] bi map ;
 
 : (sine-wave) ( samples/wave n-samples -- seq )
     [ single-sine-wave ] dip <cycles> ;
index c2a0c14ed8ea992ef0ee9508ab7572c8fbb1c018..f8d7de66da7306d0008358cc8b0ff05c9d231abd 100644 (file)
@@ -56,7 +56,7 @@ CONSTANT: tc-lisp-slides
     { $slide "Non-static stack effect"
         "Not a good practice, nor useful"
         "Not compiled by the optimizing compiler"
-        { $code "100 iota [ ] each" }
+        { $code "100 <iota> [ ] each" }
     }
     { $slide "Module system"
         "Code divided up into vocabulary roots"
@@ -359,7 +359,7 @@ var price = (order == null ? null : order.price);" }
         [ 1 - fib ] [ 2 - fib ] bi +
     ] unless ;"
         }
-        { $code "36 iota [ fib ] map ." }
+        { $code "36 <iota> [ fib ] map ." }
     }
     { $slide "Memoized Fibonacci"
         "Change one word and it's efficient"
@@ -368,7 +368,7 @@ var price = (order == null ? null : order.price);" }
         [ 1 - fib ] [ 2 - fib ] bi +
     ] unless ;"
         }
-        { $code "36 iota [ fib ] map ." }
+        { $code "36 <iota> [ fib ] map ." }
     }
     { $slide "Destructors"
         "Deterministic resource disposal"
index 44d2837aaf725c7322ee0e74b17e6d82db8a3135..e41dc1f7259e17b8242e02e7b7dd13c3f8ace69d 100644 (file)
@@ -6,7 +6,7 @@ IN: tetris.board
 TUPLE: board { width integer } { height integer } rows ;
 
 : make-rows ( width height -- rows )
-    iota [ drop f <array> ] with map ;
+    <iota> [ drop f <array> ] with map ;
 
 : <board> ( width height -- board )
     2dup make-rows board boa ;
@@ -24,8 +24,8 @@ TUPLE: board { width integer } { height integer } rows ;
 : block-free? ( board block -- ? ) block not ;
 
 : block-in-bounds? ( board block -- ? )
-    [ first swap width>> iota bounds-check? ]
-    [ second swap height>> iota bounds-check? ] 2bi and ;
+    [ first swap width>> <iota> bounds-check? ]
+    [ second swap height>> <iota> bounds-check? ] 2bi and ;
 
 : location-valid? ( board block -- ? )
     2dup block-in-bounds? [ block-free? ] [ 2drop f ] if ;
index f9323f917ef067bfb3b6ec98eeb9ddda7c387c73..d5aed2fca235c89f0e3aed6a1b3576b6bfa3d29a 100644 (file)
@@ -26,10 +26,10 @@ IN: tetris.gl
     [ gl-color 2array draw-block ] [ 3drop ] if ;
 
 : draw-row ( y row -- )
-    [ length iota swap ] keep [ (draw-row) ] 2curry each ;
+    [ length <iota> swap ] keep [ (draw-row) ] 2curry each ;
 
 : draw-board ( board -- )
-    rows>> [ length iota ] keep
+    rows>> [ length <iota> ] keep
     [ dupd nth draw-row ] curry each ;
 
 : scale-board ( width height board -- )
index 65bbdf5cd1699677aa6d6ca35912fa1e35ab6a11..90389ea17d8111a682e889b2c10da6351793c649 100644 (file)
@@ -126,4 +126,4 @@ IN: trees.avl.tests
 
 ! test that converting from a balanced tree doesn't reshape
 ! the tree
-{ t } [ 10 iota >array reverse dup zip >avl dup >avl = ] unit-test
+{ t } [ 10 <iota> >array reverse dup zip >avl dup >avl = ] unit-test
index db4302f5e3876d586d098072352a705166f3a570..9fbff0c6166107c4f6257f789af3ca9c7b5281bb 100644 (file)
@@ -5,10 +5,10 @@ tools.test trees.splay ;
 IN: trees.splay.tests
 
 : randomize-numeric-splay-tree ( splay-tree -- )
-    100 iota [ drop 100 random of drop ] with each ;
+    100 <iota> [ drop 100 random of drop ] with each ;
 
 : make-numeric-splay-tree ( n -- splay-tree )
-    iota <splay> [ '[ dup _ set-at ] each ] keep ;
+    <iota> <splay> [ '[ dup _ set-at ] each ] keep ;
 
 { t } [
     100 make-numeric-splay-tree dup randomize-numeric-splay-tree
@@ -33,7 +33,7 @@ IN: trees.splay.tests
 ] unit-test
 
 { 0 } [
-    100 iota [ dup zip >splay ] keep
+    100 <iota> [ dup zip >splay ] keep
     [ over delete-at ] each assoc-size
 ] unit-test
 
index 96546edc4a07425997b2261d0a2e56f0dedac0bf..cb4529fd07c45b041daa6de3df676cca578edba6 100644 (file)
@@ -9,12 +9,12 @@ IN: ui.gadgets.charts.demos
 CONSTANT: -pi $[ pi neg ]
 
 : sine-wave ( steps -- seq )
-    [ iota ] keep
+    [ <iota> ] keep
     pi 2 * swap / [ * pi - dup sin 2array ] curry map
     ${ pi $[ pi sin ] } suffix ;
 
 : cosine-wave ( steps -- seq )
-    [ iota ] keep
+    [ <iota> ] keep
     pi 2 * swap / [ * pi - dup cos 2array ] curry map
     ${ pi $[ pi cos ] } suffix ;
 
index e3c71a6ba5d2cd32451c73e5dfb3fb26f2fed954..4d2f9185915b331dd0cbfc19b4293e73ba100d92 100644 (file)
@@ -234,7 +234,7 @@ IN: ui.gadgets.charts.lines.tests
 {
     { 0 30 60 90 120 150 180 210 240 270 300 }
 } [
-    11 iota [ 10 + ] map [ 300 swap 20 10 scale ] map
+    11 <iota> [ 10 + ] map [ 300 swap 20 10 scale ] map
 ] unit-test
 
 { { } }
index 377e1b7a39e7cfc213b46fb4f368ff79255a0559..0bf6fc868f90362ad5ef2f3f0ae59167676183c1 100644 (file)
@@ -10,7 +10,7 @@ IN: zeromq.examples.hwclient
         "Connecting to hello world server…" print
         ZMQ_REQ <zmq-socket> &dispose
         dup "tcp://localhost:5555" zmq-connect
-        10 iota [
+        10 <iota> [
             [ "Hello" dup rot "Sending %s %d...\n" printf
               dupd >byte-array 0 zmq-send ]
             [ [ dup 0 zmq-recv >string ] dip
index 9741b75cd47f5e9dc03ddf1bea94740963176054..1e4e225e7170b22ebaad52ed9e8ba2e49c9e3884 100644 (file)
@@ -14,7 +14,7 @@ IN: zeromq.examples.tasksink
         ! Start our clock now
         now
         ! Process 100 confirmations
-        100 iota [
+        100 <iota> [
             pick 0 zmq-recv drop
             10 rem zero? [ ":" ] [ "." ] if write flush
         ] each
index 4b530091eeb31943cb7a7bdb36e9b6bac3195ffd..eb4433ad8392951b665372e5b3c713dc7ce0ed2d 100644 (file)
@@ -134,7 +134,7 @@ TUPLE: jpeg-color-info
     data>>
     binary
     [
-        read1 iota
+        read1 <iota>
         [   drop
             read1 jpeg> color-info>> nth clone
             read1 16 /mod [ >>dc-huff-table ] [ >>ac-huff-table ] bi*
@@ -195,7 +195,7 @@ MEMO: yuv>bgr-matrix ( -- m )
     { 8 8 } coord-matrix [ { u v } [ wave ] 2map product ] map^2
     1 u v [ 0 = [ 2 sqrt / ] when ] bi@ 4 / m*n ;
 
-MEMO: dct-matrix ( -- m ) 64 iota [ 8 /mod dct-vect flatten ] map ;
+MEMO: dct-matrix ( -- m ) 64 <iota> [ 8 /mod dct-vect flatten ] map ;
 
 : mb-dim ( component -- dim )  [ h>> ] [ v>> ] bi 2array ;
 
@@ -265,7 +265,7 @@ MEMO: dct-matrix-blas ( -- m ) dct-matrix >float-blas-matrix ;
     
 :: draw-macroblock-yuv444 ( mb blocks -- )
     mb { 8 8 } v* :> pos
-    3 iota [ [ blocks nth pos ] [ jpeg> draw-block ] bi ] each ;
+    3 <iota> [ [ blocks nth pos ] [ jpeg> draw-block ] bi ] each ;
 
 :: draw-macroblock-y ( mb blocks -- )
     mb { 8 8 } v* :> pos
index 8944488019809d23b11c3f4dd90eb6120c3baecc..a45df31f1d315145723c6ae79dfd3c792c4f080b 100644 (file)
@@ -14,7 +14,7 @@ IN: sudokus
 :: solutions ( puzzle random? -- solutions )
     f puzzle random? [ indices [ f ] [ random? swap nth-or-lower ] if-empty ] [ index ] if
     [ :> pos
-      1 9 [a,b] 80 iota [ pos near ] filter [ puzzle nth ] map prune diff
+      1 9 [a,b] 80 <iota> [ pos near ] filter [ puzzle nth ] map prune diff
       [ 1array puzzle pos cut-slice rest surround ] map >list [ random? solutions ] bind
     ] [ puzzle list-monad return ] if* ;