2 ms·
I don't fully understand it yet, but I think it resumes twice, adds the results, and divides by two. the `| flip ()` is pattern matching on that effect term, I
by jkarni 4y ago
I don't fully understand it yet, but I think it resumes twice, adds the results, and divides by two.
the `| flip ()` is pattern matching on that effect term, I believe. So essentially: when you see `flip ()` inside anything in the argument of `expected_value`, capture the continuation there, run that argument once with `true` and once with `false`, add the results, divide by two.