[ prog / sol / mona ]

prog


Monads,Async/Await : Algebraic Effects in C99

24 2021-01-14 16:00

//a more generic version that accepts any "roll function"
#include "Util/void.h"
#define roll(r) condelse("c",(r<0.3,"a"),(r>0.5,"b"))
#define roll2(r) condelse("c",(r<0.1,"a"),(r>0.3,"b"))
#define rollx(func) ({atype q1=__rdtsc(); func(uintdouble01(randomize(q1))); })
int main(){print(rollx(roll));}

69


VIP:

do not edit these