Comment

Comment by rml

For something this small we can enumerate all the cases (this is a Scheme version of the Mathematica `Tuples` function)

    > (list-tuples '(B G) 2)
    ((B B) (B G) (G B) (G G))
3 cases have at least one girl

of those 3 cases, 1/3 are both girls

parent rml 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton