This fails with `dist.sample_dist() is int too nested for type matching`. Is there a fix? {.experimental.} Run import std/[random] randomize() type Distribution = concept dist dist.sample_dist() is int Die = object sides: int func sample_dist( dist: Distribution ) : int = rand(1..(dist.num_sides)) func roll_dice( d: Die ) : int = d.sample_dist() + d.sample_dist() let six_sided = Die(sides: 6) echo roll_dice six_sided Run
- Why does this code using 'concepts' fail? TKD
- Why does this code using 'concepts' fail? pietroppeter