! 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
! (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
">" expect ;
: assure-no-extra ( seq -- )
- keys {
+ [ first ] map {
T{ name f "" "version" f }
T{ name f "" "encoding" f }
T{ name f "" "standalone" f }
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 ;