Closed ole closed 8 years ago
Question about the + function to append one GeneratorOfs to another:
+
GeneratorOf
Is there a specific reason why you used GeneratorOf for the arguments here? Wouldn't it be better/more generic to use GeneratorType? Like this:
GeneratorType
func +<G, E where G : GeneratorType, G.Element == E>(var first: G, var second: G) -> GeneratorOf<E> { return GeneratorOf { first.next() ?? second.next() } }
Yes, it's more generic... but I think the other one is a bit simpler to understand. I'll leave this open so we can ponder on it a bit more.
Will be fixed in the next update.
Question about the
+
function to append oneGeneratorOf
s to another:Is there a specific reason why you used
GeneratorOf
for the arguments here? Wouldn't it be better/more generic to useGeneratorType
? Like this: