Re: [Scheme-reports] multiple returns from map functions?
Aaron W. Hsu 05 May 2011 17:39 UTC
On Thu, 05 May 2011 11:43:53 -0400, <xacc.ide@gmail.com> wrote:
> The brings up the question whether list control procedures can accept
> cyclic
> lists.
> Should the following be valid?
This is interesting, normally, `map' is specifically not allowed to take
circular lists and you get an error when trying to deal with them.
However, that is partly because of the restriction prior to this that all
arguments should be of the same length. Now, I think, there is an
opportunity to consider `map' in different terms. Whether we should do
this or not is still up to question.
We could allow map to contain circular lists. This would make certain
paradigms easier. If we did such a thing, i think we would also need to
require that should map receive arguments that are all circular, it must
return a circular list where each distinct element in the list has been
"mapped." On the other hand, how much more difficult is doing this? Is it
readily feasible? Is there any precedent for doing this before? I would
not wish to do this if there is no precedent and if this does not reflect
current standard practice; though I might encourage this form of map in
experimentation outside of the standard.
Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports