4 ms·
The loop syntax may appear unfamiliar, but since the core data structure of Beads is not lists, tuples, arrays, but instead a tree, there are various options th
by magicmouse 5y ago
The loop syntax may appear unfamiliar, but since the core data structure of Beads is not lists, tuples, arrays, but instead a tree, there are various options that are more familiar to Lisp programmers, such as depth-first, or breadth-first tree traversal, but expressed as a loop, so you can conveniently stop it.
Most of the time one will use a loop in a very simplistic manner. Because it is so tedious and common to need the count of the loop, the key value, or a pointer to the element being looped across, we give you implied declaration capability in the loop consruct.
It is a compact notation that has gone through many polishing steps, and is very ergonomic, easy to read, and downright handy. Loops are the bread and butter of computer software, and yes, there are a fair number of options (such as going in reverse).
Please take the language for a spin, you might like it.