Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import System.Random
import Control.Monad
count = length . filter id
avenge = do
x <- replicateM 8 randomIO
return $ count x <= 4
test n = do
as <- replicateM n avenge
return $ fromIntegral (count as) / fromIntegral n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.