Fix examples and contrib
parent
3839e481c5
commit
7542f5a026
|
|
@ -241,7 +241,7 @@ SYMBOL: first-arg
|
||||||
dup .
|
dup .
|
||||||
[ last-quot set ] keep
|
[ last-quot set ] keep
|
||||||
[ call ] keep
|
[ call ] keep
|
||||||
[ last car update-xt ] keep call
|
[ peek update-xt ] keep call
|
||||||
2dup swap unparse write " " write unparse print
|
2dup swap unparse write " " write unparse print
|
||||||
= [ "update-xt problem" throw ] unless ;
|
= [ "update-xt problem" throw ] unless ;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,5 +111,5 @@ DEFER: (splay)
|
||||||
USING: namespaces words ;
|
USING: namespaces words ;
|
||||||
|
|
||||||
<splay-tree> "foo" set
|
<splay-tree> "foo" set
|
||||||
[ dup word-name "foo" get set-splay ] each-word
|
all-words [ dup word-name "foo" get set-splay ] each
|
||||||
[ dup word-name "foo" get get-splay drop ] each-word
|
all-words [ dup word-name "foo" get get-splay drop ] each
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
IN: numbers-game
|
IN: numbers-game
|
||||||
USING: kernel math parser random io ;
|
USING: kernel math parser io ;
|
||||||
|
|
||||||
: read-number ( -- n ) readln string>number ;
|
: read-number ( -- n ) readln string>number ;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ SYMBOL: position
|
||||||
SYMBOL: tape
|
SYMBOL: tape
|
||||||
|
|
||||||
! Initial tape
|
! Initial tape
|
||||||
20 zero-array >vector tape set
|
20 0 <array> >vector tape set
|
||||||
|
|
||||||
: sym ( -- sym )
|
: sym ( -- sym )
|
||||||
#! Symbol at head position.
|
#! Symbol at head position.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue