Overload replicate with more precise types
This PR makes the types for replicate more precise. If replicate is given a number smaller than 10 the return type is an array where TypeScript knows the length.
Is having one, two, three and four is still necessary? After this PR replicate will give just as accurate types. Additionally one doesn't seem very useful and two is the same as pair (I think) which is confusing.
Thanks, I like this change. It does make the one-four functions redundant.
There is a difference: two replicates one generator twice whereas pair tuples two different generators.
There is a difference: two replicates one generator twice whereas pair tuples two different generators.
Ah. I see. Makes sense.
Should this be merged?