This is originally from https://github.com/zustandsforschung/markov-chains but this repo has been deleted. Licence before is unknown. I started to use this lib so I may improve it and continue to share this.
Original:
I created this mainly as an exercise in doing TDD. If you want to know what all this markov-business is about I suggest you read this excellent article on Coding Horror: Markov and You or the somewhat scientific explanation on Wikipedia: Markov chain