apply
import { apply } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";Apply a function wrapped in an AsyncIterable to a value wrapped in an AsyncIterable.
@example
import { apply, collect } from "./async_iterable.ts";
import { wrap } from "./async_iterable.ts";
import { pipe } from "./fn.ts";
const asyncIterFn = wrap((n: number) => n * 2);
const asyncIterValue = wrap(5);
const result = await pipe(
asyncIterFn,
apply(asyncIterValue),
collect
);
console.log(result); // [10]
function apply<A>(ua: AsyncIterable<A>): <I>(ufai: AsyncIterable<(a: A) => I>) => AsyncIterable<I>;