Macros with page collections

Hello! I have this peace of code:

{% for page in page.find('/xyz').collection('content_package-nr_1') %}
     {{ page.content }}
{% endfor %} 

The only thing what changes here is .collection(‘nameX’). I have a page with X of collections in it. My question is, how to this with macros? In the end the result could be somehting like:

{% for page  in page.find('/xyz').collection() %}
   {{ _self.loop(page) }}
{% endfor %} 

Hope i made my question clear enough )

A very simple macro is in the navigation twig of Antimatter:

Check it out, and try to replicate it, removing all code that’s not useful to your use case.

After that, you’ll be able to call a macro named for example