In Adventuron, there are already a sub-optimal of handling loops and scanning within a container (location, entity, etc).
The look_inside command, in addition to collections, along with the while loop is a long winded way of achieving things.
As I alluded to, I suspect this would be technically work, but it's sub optimal.
A dedicated all-in-one scanning command was something I was going to work on after finishing attributes + stats.
I may move it forward if there is a demand.
The scanning construct will ultimately look a bit like this.
// Not yet working ... : scan (current_location()) { : if (is_carried(item()) { // Do something here } }