SHARE
TWEET

automata (scheme)

a guest Oct 3rd, 2010 323 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define (v s)
  2.   ((if (eq? (first s) 'c)
  3.        (letrec ((init (accept 'c loop))
  4.                 (loop (accept 'a loop
  5.                               'd loop
  6.                               'r end))
  7.                 (end (accept 'r end)))
  8.          init)
  9.        (letrec ((see0 (accept '0 see1))
  10.                 (see1 (accept '1 see0)))
  11.          see0))
  12.    s))
RAW Paste Data
Top