I love that stuff. I built a recursive tree walker to parse command line options, there is several ways to indicate state. Maybe you are familiar with Rob Pike's piece on writing a tokenizer/lexer using coroutines and atomic FIFO queues (channels and goroutines).
When I was like 16 or so, I managed to get my hands on Bison and Flex and ... i forget the name of the other tools, and started trying to create a language compiler. Something I still have on my bucket list, though I think now I'd rather not do it from scratch but just fork something else.
I'm still pretty obsessed with writing code that encodes and decodes data into binary or text form and back. A large amount of my work is this.
Lamba calculus is also not too distantly related to the algebra of chaos theory. The Mandelbrot set, for example, is a simple algorithm that returns an iteration count, that is visualised as colours.