Gen functions

Can you give this a once over, i remember the last time I made some pretty silly mistakes.
I don't think this is right. There is no size argument in our implementation of `Gen`, unlike in Haskell, so I don't think we can implement this correctly. The number you are updating is just the random seed.