(vmachine is vending machine, not virtual )
Golang implementation of Vending machine, from Chapter 11 of "Clojure for the Brave and True" book written by Daniel Higginbotham
The vending machine exhibits simple behavior: when it receives money, it releases a hot dog and then gets ready for the next purchase. When it’s out of hot dogs, it stops. All around us are hot dog vending machines in different guises—independent entities concurrently responding to events in the world.