The in-X forms are sequences, and must be used with the sequence API, ie for/X.

map only works with lists, so you could use build-list or range:
(map
    foo
    lst-A
    lst-B
    (range 2))

On Thu, Mar 2, 2017 at 9:55 AM, David Storrs <david.sto...@gmail.com> wrote:
> I'd like to be able to do something like this:
>
> (struct foo (a b c))
> (define lst-A '(a b))
> (define lst-B '(d e))
> (map
>     foo
>     lst-A
>     lst-B
>     (in-naturals))
>
> I'd expected this to produce:  (foo 'a 'd 0) (foo 'b 'e 1), but instead it
> throws an exception "expected list, given stream".  I could do it with a
> for/list but that's much more verbose.  What would be the idiomatic way of
> doing this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to