Update api.rst
Extra closing '])' in yield "yields 'LexException'
This commit is contained in:
parent
4d5eafb442
commit
7dbd3bcf7c
@ -1514,7 +1514,7 @@ infinite series without consuming infinite amount of memory.
|
|||||||
=> (import random)
|
=> (import random)
|
||||||
=> (defn random-numbers [low high]
|
=> (defn random-numbers [low high]
|
||||||
... (while True (yield (.randint random low high))))
|
... (while True (yield (.randint random low high))))
|
||||||
=> (list-comp x [x (take 15 (random-numbers 1 50))])])
|
=> (list-comp x [x (take 15 (random-numbers 1 50))])
|
||||||
[7, 41, 6, 22, 32, 17, 5, 38, 18, 38, 17, 14, 23, 23, 19]
|
[7, 41, 6, 22, 32, 17, 5, 38, 18, 38, 17, 14, 23, 23, 19]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user