I’ve just noticed that std::iter::iterate has been deprecated. It seems that the previous deprecation warning was inaccurate in claiming that it had retained its position.
I’m just wondering where I can find discussion of how this decision was reached? For what it’s worth, I’ve been using iterate and has found it to be quite useful.
Does anyone have a good suggestion for where I can find a replacement?
Yes. I adopted unfold after its deprecation in libstd (I can’t find the relevant PR number now). Deliberately chose to wait for iterate to see if it would be championed by a user. A PR is welcome! Itertools is license compatible with rust to allow easy back and forth transfer.
I think Unfold is a general, nice and very useful tool, so I understand if it is missed. In the long run I hope the “best” things from itertools are adopted by libstd – for example Unfold, .join(), .intersperse(), .foreach().