]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/maze/maze.factor
sequences: define a single "?set-nth" that is used.
[factor.git] / extra / maze / maze.factor
index bf98895b52e4cee84969894ade1699b81c10736e..0e4af964d3555e65c5d908846daa299fa444adc1 100644 (file)
@@ -1,7 +1,7 @@
 ! From http://www.ffconsultancy.com/ocaml/maze/index.html
 USING: accessors arrays fry kernel math math.order math.vectors
 namespaces opengl.gl random sequences ui ui.gadgets
-ui.gadgets.canvas ui.render sequences.private ;
+ui.gadgets.canvas ui.render ;
 IN: maze
 
 CONSTANT: line-width 8
@@ -10,13 +10,6 @@ SYMBOL: visited
 
 : unvisited? ( cell -- ? ) first2 visited get ?nth ?nth ;
 
-<PRIVATE
-
-: ?set-nth ( elt n seq -- )
-    2dup bounds-check? [ set-nth-unsafe ] [ 3drop ] if ; inline
-
-PRIVATE>
-
 : visit ( cell -- ) f swap first2 visited get ?nth ?set-nth ;
 
 : choices ( cell -- seq )