-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Markov Chains for generating random sequences with a user definable behaviour.
--   
--   This library can be used to generate random sequences of anything with
--   a behaviour that is adapted to some training data. Input a marketing
--   text or a speech and recompose it to another arbitrary text of this
--   sort. Input a dictionary of person names and create new names. Input a
--   sequence of notes and get out a new melody. Input a set of Haskell
--   modules and generate ... nice idea but the result will certainly have
--   neither correct syntax nor types. I think, it's a good thing about
--   Haskell, that you cannot fool it so easily. The idea is very simple:
--   The algorithm analyses your input/training data with respect to how
--   likely an <tt>a</tt> or <tt>e</tt> follows the letters <tt>r</tt> and
--   <tt>e</tt>. Then on recomposition it chooses subsequent letters
--   randomly according to the frequencies found in the training data. This
--   library is well suited for <i>bull-shit generators</i>.
@package markov-chain
@version 0.0.3.2


-- | Markov chains can be used to recompose a list of elements respecting
--   the fact that the probability of a certain element depends on
--   preceding elements in the list.
module Data.MarkovChain

-- | Creates a chain of elements respecting to the probabilities of
--   possible successors. The list is considered being cyclic in order to
--   have successors for the last elements.
--   
--   Example:
--   
--   <pre>
--   take 100 $ run 2 "The sad cat sat on the mat. " 0 (Random.mkStdGen 123)
--   </pre>
run :: (Ord a, RandomGen g) => Int -> [a] -> Int -> g -> [a]
runMulti :: (Ord a, RandomGen g) => Int -> [[a]] -> Int -> g -> [[a]]
