unfold


Description:

public static Iterator<A> unfold<A> (owned UnfoldFunc<A> f, owned Lazy<G>? current = null)

Create iterator from unfolding function. The lazy value is force-evaluated before progressing to next element.

Parameters:

f

Unfolding function

current

If iterator is to be valid it contains the current value of it