Skip to content

Instantly share code, notes, and snippets.

View glebec's full-sized avatar
🥃
Slàinte

Gabriel Lebec glebec

🥃
Slàinte
View GitHub Profile
@glebec
glebec / Main.hs
Created January 29, 2024 04:48
Red-Green vs Red-Red
module Main where
{-
This is a simulation of a problem posed by Daniel Litt in a tweet:
https://twitter.com/littmath/status/1751648838501224790
> You are given an urn containing 100 balls; n of them are red, and
> 100-n are green, where n is chosen uniformly at random in [0, 100].
> You take a random ball out of the urn—it’s red—and discard it. The
> next ball you pick (out of the 99 remaining) is: