SHARE
TWEET

Untitled

tinyevil Nov 11th, 2018 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template<class T>
  2. generator< pair<int, T> > enumerate(generator<T> gen){
  3.     int idx = 0;
  4.     while ( T val = gen() ){
  5.         yield {idx, val};
  6.         idx++;
  7.     }
  8. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top