summaryrefslogtreecommitdiffstats
path: root/stdlib/place.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-29 00:27:09 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-29 00:27:09 -0800
commit09010c1509a30cdd042f1b31a1ecd84922adbba2 (patch)
tree631c9050f8ee41ac8131ea8ee1f6a3df2be0ffb7 /stdlib/place.tl
parentaeae4fc3dcfbb4b5376515e5660134e79a4f54c3 (diff)
downloadtxr-09010c1509a30cdd042f1b31a1ecd84922adbba2.tar.gz
txr-09010c1509a30cdd042f1b31a1ecd84922adbba2.tar.bz2
txr-09010c1509a30cdd042f1b31a1ecd84922adbba2.zip
random-sample: replace algorithm R.
* rand.c (random_sample): The brnach of the code for lists is converted from the naive algorithm R which requires a random integer for each element of the sequence to a list adaptation of the smarter algorithm L used for vector. We don't have random access through the list being sampled, but we can step to new positions without generating random numbers.
Diffstat (limited to 'stdlib/place.tl')
0 files changed, 0 insertions, 0 deletions