Thanks.
The use case is simply thinking through the details of a minimal osascript (mostly action and export code) rewrite of a comparison table generated from the notes selected in the GUI.
(Reflections prompted by @cremoer 's question on that topic)
Once we have a list of which notes the user has selected for comparison:
- The
collectoperator works well for the rows of attribute values for each note, - and probably even for re-rendering
trueboolean values as ticks and the review integers as star-lists, etc - but more generally, I think the casual scripter is served well by not having to fiddle too much with var declarations and looping increments and mutations, around which bugs are prone to cluster, and in which time has a tendency to evaporate.
If I were going to shift some of what I do from JS to action script and export script, I think I would want to paste some boilerplate that would enable me to think in terms of map and fold kinds of pattern (just to protect myself and my time a bit from detail and from accident)
( But perhaps, as you suggest, complexity of any kind is really best pushed out to runCommand and osascript )