mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
sequtils: replace deprecated 'random' call within example (#12515) [backport]
This commit is contained in:
@@ -903,7 +903,7 @@ template newSeqWith*(len: int, init: untyped): untyped =
|
||||
|
||||
## Creates a sequence of 20 random numbers from 1 to 10
|
||||
import random
|
||||
var seqRand = newSeqWith(20, random(10))
|
||||
var seqRand = newSeqWith(20, rand(10))
|
||||
|
||||
var result = newSeq[type(init)](len)
|
||||
for i in 0 ..< len:
|
||||
|
||||
Reference in New Issue
Block a user