]> gitweb.factorcode.org Git - factor.git/commitdiff
24-game: update for iota
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 14 Jan 2010 17:22:20 +0000 (06:22 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 14 Jan 2010 18:15:35 +0000 (07:15 +1300)
extra/24-game/24-game.factor

index 15c610ce7a6a5e5086ab23848730666e99097d3e..a973cf3367d5e190b25e506a6f8e0c38244514b5 100644 (file)
@@ -56,7 +56,7 @@ DEFER: check-status
         [ end-game ] 
         [ dup quit? [ quit-game ] [ repeat ] if ]
     if ;
-: build-quad ( -- array ) 4 [ 10 random ] replicate >array ;
+: build-quad ( -- array ) 4 [ 10 iota random ] replicate ;
 : 24-able? ( quad -- t/f ) [ makes-24? ] with-datastack first ;
 : 24-able ( -- vector ) build-quad dup 24-able? [ drop build-quad ] unless ;
 : set-commands ( -- ) { + - * / rot swap q } commands set ;