From: Matthew Moss Date: 2008-08-16T08:51:14+09:00 Subject: Re: Not So Random (#173) > The first part is to create a wrapper around the random number > generator `rand`, supporting the appropriate parameter (i.e. the > parameter intrinsic to `rand`). Your wrapper should implement two > additional functions: `next` which returns the next random number, and > `reset` which restarts the sequence. So, for example: > ..... > You may do this as a class, as depicted here, or as a function, > lambda, code block... whatever you like. Let me add a bit of additional info to this... I indicated that you should implement methods `next` and `reset` on your wrapper. This is not a hard requirement. You _do_ need to provide a way to access a particular generator's (i.e. wrapper's) next number, and provide a way to reset the sequence. For a class wrapper, this is somewhat natural to do as methods `next` and `reset`, hence my suggestion. However, if you find want to use another technique (function, code block, closure, etc.) is more suitable for your solution, please do... and if that means providing alternate means (other than next/reset methods) to access the next random number and reset the sequence, that's fine. Just state in your submission how you provided for next/ reset equivalents.