]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/turing/turing.factor
Fix comments to be ! not #!.
[factor.git] / extra / turing / turing.factor
index 18d66a2e516d2fd0f49dc622682f0a0e600a8609..e4edf681b73b5484a09dd40e06998d71ce5dc51c 100644 (file)
@@ -41,30 +41,30 @@ SYMBOL: tape
 20 0 <array> >vector tape set
 
 : sym ( -- sym )
-    #! Symbol at head position.
+    ! Symbol at head position.
     position get tape get nth ;
 
 : set-sym ( sym -- )
-    #! Set symbol at head position.
+    ! Set symbol at head position.
     position get tape get set-nth ;
 
 : next-state ( -- state )
-    #! Look up the next state/symbol/direction triplet.
+    ! Look up the next state/symbol/direction triplet.
     state get sym 2array states get at ;
 
 : turing-step ( -- )
-    #! Do one step of the turing machine.
+    ! Do one step of the turing machine.
     next-state
     dup sym>> set-sym
     dup dir>> position [ + ] change
     next>> state set ;
 
 : c ( -- )
-    #! Print current turing machine state.
+    ! Print current turing machine state.
     state get .
     tape get .
     2 position get 2 * + CHAR: \s <string> write "^" print ;
 
 : n ( -- )
-    #! Do one step and print new state.
+    ! Do one step and print new state.
     turing-step c ;