Scala and Markov Chains