Hacker News new | ask | show | jobs
by jimbokun 1518 days ago
If I understand the idea of the linked article correctly, I sometimes do a similar thing in Java by defining an Iterator that implements some sort of traversal over a recursive data structure, then can apply any operations to the returned items using a for loop, applying an anonymous function to all the items, etc.

From some of the sibling comments, seems like there is a strong connection between these recursion schemes and iterator strategies?