Skip to content

Instantly share code, notes, and snippets.

@darrint
darrint / gist:1854004
Created February 17, 2012 15:21
New Yesod Logo. You're welcome.
Medium resolution:
__ __ __
\ \ \ \ / /
\ \ \ V / ==
/ / | | ===
/_/ |_|
Icon:
@darrint
darrint / gist:1854008
Created February 17, 2012 15:23
New Yesod Logo. You're welcome.
Medium resolution:
__ __ __
\ \ \ \ / /
\ \ \ V / ==
/ / | | ===
/_/ |_|
Icon:
@darrint
darrint / monte.hs
Created February 24, 2016 13:05
What are the odds of rolling 3d8 and getting a sum of 8, if you can reroll the third die.
count :: [(Bool, Bool)]
count = do
d1 <- [1..8]
d2 <- [1..8]
d3 <- [1..8]
d4 <- [1..8]
let sum3ok = sum([d1, d2, d3]) == 8
let sum4ok = sum([d1, d2, d4]) == 8
return (sum3ok, sum4ok)