If going in this direction, then I think eliminating counting example from your examples would make things simpler for now.
It could be a separate method, e.g. (...).ntrue(n=1, pred=None)
, which counts up to and including n
.
If going in this direction, then I think eliminating counting example from your examples would make things simpler for now.
It could be a separate method, e.g. (...).ntrue(n=1, pred=None)
, which counts up to and including n
.