]> gitweb.factorcode.org Git - factor.git/commitdiff
iota: iota vs iota-tuple. Sorry...for the tools to work!
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 23 Mar 2013 23:36:22 +0000 (16:36 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 23 Mar 2013 23:36:22 +0000 (16:36 -0700)
core/sequences/sequences-tests.factor
core/sequences/sequences.factor
core/sorting/sorting-tests.factor

index 34bf2abdbac96663d1386f60ec0e20f9174e2e77..70bd01fb98f001ff6ce011feff4938aac3a41d81 100644 (file)
@@ -314,7 +314,7 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
 
 [ "asdf" iota ] must-fail
 [ -1 iota ] must-fail
-[ T{ iota { n 10 } } ] [ 10 iota ] unit-test
+[ T{ iota-tuple { n 10 } } ] [ 10 iota ] unit-test
 [ 0 ] [ 10 iota first ] unit-test
 
 [ "hi" 3 ] [
index 4765de956b04ae5e6a9dd482be16a9d6f55cae11..e496e55c244025f8029bbd0e7a4d17d6a4c2887d 100644 (file)
@@ -102,17 +102,18 @@ M: f like drop [ f ] when-empty ; inline
 INSTANCE: f immutable-sequence
 
 ! Integer sequences
-TUPLE: iota { n integer read-only } ;
+TUPLE: iota-tuple { n integer read-only } ;
 
 ERROR: non-negative-integer-expected n ;
 
 : iota ( n -- iota )
-    dup 0 < [ non-negative-integer-expected ] when \ iota boa ; inline
+    dup 0 < [ non-negative-integer-expected ] when
+    \ iota-tuple boa ; inline
 
-M: iota length n>> ; inline
-M: iota nth-unsafe drop ; inline
+M: iota-tuple length n>> ; inline
+M: iota-tuple nth-unsafe drop ; inline
 
-INSTANCE: iota immutable-sequence
+INSTANCE: iota-tuple immutable-sequence
 
 <PRIVATE
 
index 101cd75a5ba1f7aaf3a53bf49eba55ea584d754c..2627e61a644e7a80fc4cd22b53650adad6d96f96 100644 (file)
@@ -5,7 +5,7 @@ IN: sorting.tests
 [ { } ] [ { } natural-sort ] unit-test
 
 [ { 270000000 270000001 } ]
-[ T{ slice f 270000000 270000002 T{ iota f 270000002 } } natural-sort ]
+[ T{ slice f 270000000 270000002 T{ iota-tuple f 270000002 } } natural-sort ]
 unit-test
 
 [ t ] [