(i) is this useful enough to be made a standard function, or should we just mention this kind of technique in the cheat sheet chapter (if at all?)

Very useful particularly in simulations as Sven mentioned but also potentially in many big data applications

(ii) in case the answer is yes, should we add this to libgretl or just provide the function in the "extra" addon?

The more functions (well documented and fast) the better... I would go for libgretl


(Merry Christmas and a Happy new year!)


Yiannis