Hi Nico,
Thank you again for your detailed responses. I'm just getting back into the
office. I do appreciate your taking the time to analyze my code.
Your for loop to replace my recursive apparatus taught me two things: I was
previously unfamiliar with the at clause in the for loop, and I didn't know
the idiv operator before. Thank you!
Regarding the signature for map:merge(): Ouch! I have used that function
many times. I should have known better.
Thank you also for the advice on using the for loop instead of the
recursive approach.
Regarding
return
(: base case: each value except the last should have 100 items
in it; the last should have <= 100; in this case we return the map
goal is to build a map with 63 keys, with each value
a sequence of 100 or 93 (in the last case) strings :)
if ((($key_count + 1) * 100) >= count($pmids))
then $pmid_map
I thought because I was multiplying $key_count + 1, rather than $key_count,
by 100, the condition would be true after the last 93 elements of the
sequence. I thought there would be 63 key/value pairs after the final 93
are added, so the base case would be triggered by
(63 + 1) * 100 >= 6293
Perhaps I'm off by one. Though I've abandoned the recursive function
altogether in favor of your for loop.
Again thanks,
Chuck