Lists in every editor
Much of what a script handles comes in lists: the points of a curve, the faces of a solid, the copies of a part. Two different things can happen to a list, and it helps to tell them apart.
A list as one value
Some functions want a whole list. bitbybit.occt.shapes.wire.interpolatePoints takes a list of points and makes one curve through all of them; bitbybit.occt.booleans.difference takes one shape and a list of shapes to cut from it. The list travels as a single value, exactly like a number would.
Here bitbybit.point.spiral makes a list of two hundred points, and one curve is made through them:

- Rete
- Blockly
- TypeScript
const points = bitbybit.point.spiral({ numberPoints: 200, radius: 6 });
const curve = await bitbybit.occt.shapes.wire.interpolatePoints({ points });
await bitbybit.draw.drawAnyAsync({ entity: points });
await bitbybit.draw.drawAnyAsync({ entity: curve });
Drawing a list of points draws every point; drawing a list of shapes draws every shape.
Once per item
Other times you want a function to run once for each item: a sphere at every point, a fillet on every part. Each editor says that in its own way:
- TypeScript uses the language:
points.map(...)or aforloop, withawait Promise.all(...)when the function is a kernel call. - Blockly has loops: the repeat and for-each blocks of its loops category run the blocks inside them for every item.
- Rete repeats a component on its own: when several wires feed one input, the component runs once per value, every value against every value or paired 1:1. Lists and node options shows how, and the badges that say what a component received.
Reshaping lists
The bitbybit.lists functions read and reshape lists in every editor: take an item or a range, reverse, flatten nested lists, group, pair. Lists introduces them.



