Skip to content

Instantly share code, notes, and snippets.

@bradclawsie
Created March 1, 2012 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradclawsie/1947841 to your computer and use it in GitHub Desktop.
Save bradclawsie/1947841 to your computer and use it in GitHub Desktop.
random string of uppercase chars
module Main where
import Control.Monad.Random
import Data.Char
rnd :: (RandomGen g) => Rand g Int
rnd = getRandomR (65,90)
main = do
values <- evalRandIO (sequence (replicate 10 rnd))
putStrLn $ map chr values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment