A simple Julia implementation of finite state machines