[scheme-reports-wg1] Post-plebiscite issue #3: structure-sharing for mapping
John Cowan 11 May 2013 17:56 UTC
In accordance with Will Clinger's posting, Alexey Radul and I are raising
this issue for the WG1 to resolve after the plebiscite is complete.
I document it now so that WG1 members can discuss it now.
Alexey writes:
> - Do map and friends [pp.50-51] always return newly allocated results?
> For example, it's not too hard to write an otherwise-valid
> definition of map where
> (let ((one '(1 6 1 8 0 3))
> (two '(1 4 1 4 2 1)))
> (eqv? one (map (lambda (x y) x) one two)))
> ==> #t
> and one might even want that, to save space. There are of course
> more complicated examples where the result of a map could share list
> structure with the tail of one of its inputs, as long as the
> procedure being mapped returned those elements unchanged.
Currently, the draft just says "returns a list", "returns a string", and
"returns a vector", without saying "newly allocated". I believe nothing
needs to be added. Does any WG1 member disagree? Does any member of
the Scheme community disagree? Silence gives consent.
--
He played King Lear as though John Cowan <cowan@ccil.org>
someone had played the ace. http://www.ccil.org/~cowan
--Eugene Field
--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg1" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-wg1+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.