fromIterable
import { fromIterable } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";Convert a synchronous Iterable to an AsyncIterable.
@example
import { fromIterable } from "./async_iterable.ts";
const syncArray = [1, 2, 3, 4, 5];
const asyncIter = fromIterable(syncArray);
for await (const value of asyncIter) {
console.log(value); // 1, 2, 3, 4, 5
}
function fromIterable<A>(ta: Iterable<A>): AsyncIterable<A>;