News for hackers. Stuff that matters.
Re:Go 1.22 Release Notes by KingOfCoders on Wednesday February 07, 2024 @09:34AM (#39289018)
Iterator is not only about collections. Its not as powerful as a yield around continuations but you can return whatever you like.

~15 (?) years ago I wrote a "famous" blog post on how to use Iterator as a poor man Maybe/Option.

   for (String s: m Option<String>) {
     // Executed on Some
   }

There are no comments on this comment yet.