User talk:Hout
Restored this on the grounds that it matches all three of the stated requirements:
- They should be distinct from (nested) for loops within the syntax of the language. - They should return either a list or an iterator (something that returns successive members of a collection, in order). - The syntax has parts corresponding to that of set-builder notation.
It uses no for loops, returns a list, and has the parts corresponding to set-building notation.
The previous alternative is useful, but is restricted to a smaller subset of JavaScript, and arguably uses for loops.
If we are to delete one, we should delete both, but I am not sure that either approach has much value.
Both examples are illustrative of such resources as JavaScript is currently able to provide for patterns of this kind.