traverseTask<B> method
Implementation
Task<IList<B>> traverseTask<B>(Task<B> f(A a)) {
Task<IList<B>> result = Task.value(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());
}