14 lines
435 B
Common Lisp
14 lines
435 B
Common Lisp
|
|
;; exmple of FSM
|
|
;; vending machine
|
|
;; - gum :: 15 cents
|
|
;; - mints :: 20 cents
|
|
;; any combination of
|
|
;; DIME - 10c
|
|
;; NICKEL - 5c
|
|
;; if enough money is in, press of either button would get you the product and change
|
|
;; pressing coin return at any time will return amount equal to being put in so far
|
|
|
|
;;; and the exercise is to use macro to compile FSM with functions for states, from defstate & defarc structures
|
|
;; that seems cool
|