<p dir="ltr"><br>
On 22-Mar-2016 4:14 pm, "Olumide" <<a href="mailto:50295@web.de">50295@web.de</a>> wrote:<br>
> randoms' :: (RandomGen g, Random a) => g -> [a]<br>
> randoms' gen = let (value, newGen) = random gen in value:randoms' newGen</p>
<p dir="ltr">"random gen" returns a pair, whose first element is a random value, and the second element is a new generator.</p>
<p dir="ltr">The cons (:) operator takes two values, one is an element, and the other is a list. It returns a new list with the provided arguments as head and tail.</p>
<p dir="ltr">Ultimately, randoms' gen returns a list whose first element is a random value, and the rest of the list is the result of calling randoms' on the newly produced generator. Recursively, it generates an infinite lazy list of random elements.</p>
<p dir="ltr">Hope this helps :)</p>
<p dir="ltr">Regards,<br>
  Sumit </p>