Gen functions

Can you give this a once over, i remember the last time I made some pretty silly mistakes.
Can we rely on `reduce` being available generally? Genuine question, I don't know the answer, but I suspect some earlier browsers might not have it, and if we're providing `generate` to generate random data, some users might like to use this library for non-testing reasons in the browser.