...while ideally this uses the grb::internal::Distribution class as a template argument, so as to minimise any overhead in index translation by "template magic". This also I believe would lead to cleaner code.
There is a caveat: what about stateful distributions? It looks to me at a cursory glance that states, which are currently allowed within lambda functions of course, should in fact be retained. The compiler of course will erase any stateless objects, just as it does for algebraic types at the moment already.