Without changing parameters, can add ability to generate variable length slices. To achieve this, need to add following:
- the generate functions'
size parameter can be negative; and
- we add a public custom error - e.g.
EndOfGeneration - that can be returned by the generator function(s) and will cause successful termination of generation;
Without changing parameters, can add ability to generate variable length slices. To achieve this, need to add following:
sizeparameter can be negative; andEndOfGeneration- that can be returned by thegeneratorfunction(s) and will cause successful termination of generation;