traverseFree<F, B> method
Implementation
Free<F, IList<B>> traverseFree<F, B>(Free<F, B> f(A a)) {
Free<F, IList<B>> result = new Pure(nil());
var current = this;
while(current._isCons()) {
final gb = f(current._unsafeHead());
result = result.flatMap((a) => gb.map((h) => new Cons(h, a)));
current = current._unsafeTail();
}
return result.map((l) => l.reverse());
}