[Feature request] uniform support for @inwrap and @outwrap attributes

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
raphaelradna
Posts: 1
Joined: Mon Sep 20, 2021 5:13 am

[Feature request] uniform support for @inwrap and @outwrap attributes

Post by raphaelradna » Tue Jul 04, 2023 3:11 am

Frequently, while working with bach, I have to add bach.wrap and bach.flat objects to make lllls into the right shape for a particular process. These objects clutter the code, especially when iterating multiple lists in parallel. Some objects have @inwrap, @outwrap, and/or @unwrap parameters, allowing manipulation of the list depth as a secondary function of the object, but I can never remember which objects offer these attributes, and oftentimes the object I need doesn't have them.

What do you think of adding these attributes to all bach objects? Or, at least the list-processing utilities (bach.iter, bach.step, bach.drip, bach.collect, bach.join, bach.lace, bach.delace, etc.) Additionally, it would be nice if @inwrap and @outwrap could take negative arguments to remove layers of depth (in that case, @outwrap -1 would be equivalent to @unwrap 1). Thanks for your consideration.

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: [Feature request] uniform support for @inwrap and @outwrap attributes

Post by danieleghisi » Fri Jul 07, 2023 11:16 pm

Hello, I understand, thanks for the suggestion.
I'll talk to Andrea and we'll try to think about it.

Post Reply