no unit tests?? new accessors

db4
Doug Coleman 2008-08-30 21:25:47 -05:00
parent 754d68fb95
commit 3f82d8eb9e
1 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
USING: kernel parser lexer strings math namespaces sequences words io
arrays quotations debugger kernel.private sequences.private ;
USING: kernel parser lexer strings math namespaces
sequences words io arrays quotations debugger accessors
sequences.private ;
IN: state-machine
: STATES:
@ -20,9 +21,9 @@ M: missing-state error.
! quot is ( state string -- output-string )
[ missing-state ] <array> dup
[
[ >r dup dup state-data swap state-place r> ] %
[ >r dup [ data>> ] [ place>> ] bi r> ] %
[ swapd bounds-check dispatch ] curry ,
[ each pick set-state-place swap set-state-data ] %
[ each pick (>>place) swap (>>date) ] %
] [ ] make [ over make ] curry ;
: define-machine ( word state-class -- )