take
import { take } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/iterable.ts";Take the first n elements from an Iterable.
@example
import * as I from "./iterable.ts";
const numbers = I.wrap(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
const firstThree = I.take(3)(numbers);
const result = Array.from(firstThree); // [1, 2, 3]
function take(n: number): <A>(ta: Iterable<A>) => Iterable<A>;