[ prog / sol / mona ]

prog


Monads,Async/Await : Algebraic Effects in C99

31 2021-01-14 20:06

This is better, but (from skimming the code) you are missing at least one thing: The last argument to roll can be "t", which is replaced by the rest-chance, so in my example 100% - 50% - 30% = 20%.
Also, this isn't just a chance-cond, the sum of all chances may not exceed 1, in your case, printing "symbol4" doesn't have a chance of 0.5, but is dependent on all the previous cases. So in other words, (* 0.9 0.8 0.85 0.5), which /= 0.5.

69


VIP:

do not edit these