language agnostic - What are some useful or interesting infinite generators? -


what clever uses infinite generators? i've seen lots of seemingly trivial examples "list numbers", assume there must others have more applicability real-world scenarios. concrete examples (in language support generators) appreciated!

i'll give trivial sample answer.

look @ haskell code on http://rosettacode.org/wiki/hamming_numbers#haskell; uses lazy lists (which generators) in creative way list hamming numbers.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -