Unfortunately, this example doesnt work for me, because I dont know how long the list will be, and also dont know how many iterations there will be. Is there another way to achieve the same thing without zl group?
I'm not sure if this is what you want but another approach would be to add a terminator (I've used -1). This compensates for [zl]'s inability to tell you about empty lists. The routine reads the list until it gets to the terminator and then sends a bang to [zl group].