[r6rs-discuss] Multiple returns from higher-order procedures
On Sun, 24 Jun 2007, William D Clinger wrote:
> Yes. With vector-sort or vector-map, if you allocate
> the result vector before you call the predicate or
> procedure argument, filling in the result vector as
> you go, then you will see exactly the same kind of
> bug you would see with a map procedure that builds
> the result in reverse order and then uses reverse!
> at the end.
>
> The R6RS should forbid this class of bugs for
> vector-sort and vector-map, just as it does for
> map.
As Will said. Let me just add again that it is important
for these primitives to behave correctly w.r.t. call/cc
whenever one implements backtracking with call/cc (e.g., in
logic programming applications). If they don't, users would
have to remember to replace them whenever they write
such applications. I am sure others can come up with more
examples (maybe threads?).
Andre
Received on Sun Jun 24 2007 - 14:59:25 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC