fromSample :: [String] -> MarkovChain
fromSample ss = fromTransitionMap $ foldl addTransition M.empty $ concatMap pairs ss
  where pairs s = let ws = words s in zipWith (,) ("":ws) ws
fromSample :: [String] -> MarkovChain
fromSample ss = fromTransitionMap $ foldl addTransition M.empty $ concatMap pairs ss
  where pairs s = let ws = words s in zipWith (,) ("":ws) ws
fromSample ss = fromTransitionMap $ foldl addTransition M.empty $ concatMap pairs ss
  where pairs s = let ws = words s in zipWith (,) ("":ws) ws