Skip to content

Commit

Permalink
new accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
erg committed Aug 31, 2008
1 parent 98c2548 commit 754d68f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extra/turing/turing.factor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IN: turing
USING: arrays assocs io kernel math namespaces
prettyprint sequences strings vectors words ;
prettyprint sequences strings vectors words accessors ;
IN: turing

! A turing machine simulator.

Expand Down Expand Up @@ -55,9 +55,9 @@ SYMBOL: tape
: turing-step ( -- )
#! Do one step of the turing machine.
next-state
dup state-sym set-sym
dup state-dir position [ + ] change
state-next state set ;
dup sym>> set-sym
dup dir>> position [ + ] change
next>> state set ;

: c ( -- )
#! Print current turing machine state.
Expand Down

0 comments on commit 754d68f

Please sign in to comment.