answered 2020-09-12 09:00:49 +0200
Make your own iterator that stops adding elements when the cardinality gets too big.