How to Use Generators – batching, cancellation, pause/resume
blog.bloomca.me
blog.bloomca.me
Icon and UnIcon are examples where generators and co-expressions are fundamental to the language and so are used throughout most of your programs as a natural part of writing solutions to the problems being solved.
I find it interesting that iterators are such a big thing when they are just generators in Icon/UnIcon. I have seen many examples written in JS where map and lambda functions are used and the equivalent in Icon/UnIcon is a simple generator to get the same results.
Icon has been around since the early 80's (as the successor of SNOBOL4) and UnIcon as a separate project since around 2000. I should remark that the UnIcon translates UnIcon programs to Icon.
Goes to show that there is still much life in some of these older languages.