Skip to content

Instantly share code, notes, and snippets.

View Noble-Mushtak's full-sized avatar

Noble Mushtak Noble-Mushtak

View GitHub Profile
@Noble-Mushtak
Noble-Mushtak / Markov.hs
Last active July 30, 2019 23:29 — forked from atcol/Markov.hs
Fixed bugs in simple tri-state Markov Chain generator
#!/usr/bin/env stack
-- stack --resolver lts-13.30 script --package random
import Control.Monad (foldM)
import Data.List (elemIndex, minimumBy)
import Data.Maybe (fromMaybe)
import Debug.Trace (trace)
import System.IO (getLine)
import System.Random (randomIO, randomRIO)