Skip an entry of a random iterator

后端 未结 2 1764
耶瑟儿~
耶瑟儿~ 2020-12-22 04:04

Suppose we have a function foo that does something to all the elements between *firsta and *lastb:

foo(Rando         


        
2条回答
  •  眼角桃花
    2020-12-22 04:40

    The answer might be a bit picky, but you could call foo(firsta,i-1) and foo(i+1,lastb) or something similar to have the desired effect.

提交回复
热议问题