]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix using list in sequences.unrolled, keys/values was not appropriate in several...
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 21 May 2010 20:28:05 +0000 (15:28 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 21 May 2010 20:28:05 +0000 (15:28 -0500)
basis/game/input/x11/x11.factor
basis/sequences/unrolled/unrolled-tests.factor
basis/xml/elements/elements.factor
extra/project-euler/206/206.factor

index c1f1c59fc0dc01d8c87a526b773f262ba11cac6c..2e6514d396e2c50925c69673a5261172551106e7 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2010 Erik Charlebois, William Schlieper.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types arrays kernel game.input namespaces math
-classes bit-arrays system sequences vectors x11 x11.xlib ;
+USING: accessors alien.c-types arrays kernel game.input
+namespaces math classes bit-arrays system sequences vectors
+x11 x11.xlib assocs ;
 IN: game.input.x11
 
 SINGLETON: x11-game-input-backend
index 47fdd4fa3f75a7bd7e3351b77e510fa19aadd1e3..57a1099d8faa31b7618b6ded31b528a9b2fe04c7 100644 (file)
@@ -1,5 +1,6 @@
 ! (c)2010 Joe Groff bsd license
-USING: compiler.test math.parser sequences.unrolled tools.test ;
+USING: compiler.test make math.parser sequences
+sequences.unrolled tools.test ;
 IN: sequences.unrolled.tests
 
 [ { "0" "1" "2" } ] [ { 0 1 2 } 3 [ number>string ] unrolled-map ] unit-test
index 39afcc8fca721b5cafb789d13509d5ee16feb9fd..1e59c199091ce90705359a5640c63c23c7a9ce33 100644 (file)
@@ -55,7 +55,7 @@ IN: xml.elements
     ">" expect ;
 
 : assure-no-extra ( seq -- )
-    keys {
+    [ first ] map {
         T{ name f "" "version" f }
         T{ name f "" "encoding" f }
         T{ name f "" "standalone" f }
index 87693b60dbc3896da587c4e2db374c7105d018c3..10f5259bdc4146382612eee01836f17554acb482 100644 (file)
@@ -30,8 +30,8 @@ CONSTANT: lo 1010101030
 CONSTANT: hi 1389026570
 
 : form-fitting? ( n -- ? )
-    number>digits 2 group keys
-    { 1 2 3 4 5 6 7 8 9 0 } = ;
+    number>digits 2 group [ first ] map
+    { 1 2 3 4 5 6 7 8 9 0 } sequence= ;
 
 : candidates ( -- seq )
     lo lo 40 + [ hi 100 <range> ] bi@ cord-append ;