range
returns an infinite sequence of integers, starting from zero. When map
is passed two collection arguments, it calls f
with two arguments, taking them pairwise from the collections. Thus, your f
will be called once for each element x
in d1
, with two arguments: x
, and its index in d1
.
As an aside, please paste code that works, or at least makes sense. The #
is in a nonsense place, and the parens don't balance.