Help me understand the differences between UnfoldFirstSequence and UnfoldSequence

I’ve read the explanation from chapter 5, and I’ve read the explanation in the Swift evolution proposal, but I’m still struggling to understand the difference in usage between the two.

Could you give me an example of where one would chose to use UnfoldSequence over UnfoldFirstSequence, please? They feel extremely similar to me.

Thank you @allanspreys for posting your question and seeking help from the forum. We will do our best to assist you with your query.

Don’t hesitate to ask any further questions or provide additional details to help us understand your issue better.

@Jellodiil your feedbacks would be appreciated

While I have almost no Swift knowledge,
@rayfix, the author of the chapter, might have some insights :slight_smile: