diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 4dee0b592d..23ab4b5d84 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -91,6 +91,8 @@ M: sequence set-nth-unsafe set-nth ; inline : change-nth-unsafe ( i seq quot -- ) [ [ nth-unsafe ] dip call ] 3keep drop set-nth-unsafe ; inline +PRIVATE> + ! The f object supports the sequence protocol trivially M: f length drop 0 ; inline M: f nth-unsafe nip ; inline @@ -98,20 +100,18 @@ M: f like drop [ f ] when-empty ; inline INSTANCE: f immutable-sequence -PRIVATE> - -! In the future, this will replace integer sequences +! Integer sequences TUPLE: iota { n integer read-only } ; : iota ( n -- iota ) \ iota boa ; inline -> ; inline M: iota nth-unsafe drop ; inline INSTANCE: iota immutable-sequence +