]> gitweb.factorcode.org Git - factor.git/commitdiff
cursors: fix load errors w/o auto-use
authorJoe Groff <arcata@gmail.com>
Wed, 24 Mar 2010 21:37:01 +0000 (14:37 -0700)
committerJoe Groff <arcata@gmail.com>
Wed, 24 Mar 2010 21:37:01 +0000 (14:37 -0700)
extra/cursors/cursors.factor

index 03855bc5368b26a1689348eff39a575bf5013bc1..84b3d0ef78940305e8be5808975cd7997bf805ef 100644 (file)
@@ -1,6 +1,6 @@
 ! (c)2010 Joe Groff bsd license
 USING: accessors arrays assocs combinators.short-circuit fry
-hashtables kernel locals math math.functions sequences ;
+hashtables kernel locals math math.functions math.order sequences ;
 FROM: sequences.private => nth-unsafe set-nth-unsafe ;
 FROM: hashtables.private => tombstone? ;
 IN: cursors
@@ -116,11 +116,6 @@ M: end-of-stream cursor= eq? ; inline
 M: end-of-stream inc-cursor ; inline
 M: end-of-stream cursor-stream-ended? drop t ; inline
 
-INSTANCE: finite-stream-cursor container
-
-M: finite-stream-cursor begin-cursor ; inline
-M: finite-stream-cursor end-cursor drop end-of-stream ; inline
-
 !
 ! basic iterator
 !
@@ -229,6 +224,11 @@ INSTANCE: container collection
 
 : each ( ... container quot: ( ... x -- ... ) -- ... ) container- -each ; inline
 
+INSTANCE: finite-stream-cursor container
+
+M: finite-stream-cursor begin-cursor ; inline
+M: finite-stream-cursor end-cursor drop end-of-stream ; inline
+
 !
 ! sequence cursor
 !
@@ -479,7 +479,7 @@ M: zip-cursor cursor-key-value
 : 2all- ( a b quot -- begin end quot )
     [ 2all ] dip ; inline
 
-ALIAS: -2container- assoc ; inline
+ALIAS: -2container- -assoc-
 
 : 2container- ( a b quot -- begin end quot' )
     2all- -2container- ; inline