Thanks for all the quick replies! I've been using for/fold till now and was planning to use concatenation. (Indeed, append makes it more readable). The for*/list and the sequence solutions also seem to be what I was looking for as they seem to be avoid iterating twice and should be easy to convert to for-mul/list, for-mul/hash macros which directly allow the body to return 0 or more additions. On Fri, Apr 15, 2011 at 3:11 PM, harsha reddy <[email protected]> wrote:
> When using the various versions of for like for/list; I often encounter > situations where the body must not add any value to put into the generated > list (useful when one needs to filter and map simultaneously) or must > generate more than value. I guess the way to do this would be to treat the > result of the body as a list of additions and then concatenate all these > lists. Something similar would be needed for for for/hash(taking care of the > multiple values issue),for/and, for/vector etc. > I just wanted to know, because this seems like a common enough situation, > if there are some standard commands or libraries which implement the > modified versions of these commands. > thanks, > Harsha >
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

