Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

question about vector-sort returning multiple times

24 views
Skip to first unread message

Yongming Shen

unread,
Aug 7, 2022, 12:11:43 AM8/7/22
to chez-scheme
Hi,

According to R6RS (http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-5.html#node_chap_4): "if multiple returns occur from list-sort or vector-sort, the return values returned by earlier returns are not mutated".

Given that the proc argument of vector-sort "should not have any side effects", the continuation of a vector-sort invocation can not be recorded, so how can vector-sort return multiple times?

Assuming there is a way to make a vector-sort invocation return multiple times, does the R6RS requirement incur copying overhead in vector-sort?
Reply all
Reply to author
Forward
0 new messages