Skip to main content
Module

x/fun/mod.ts>iterable.collect

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function iterable.collect
import { iterable } from "https://deno.land/x/fun@v2.0.0-alpha.12/mod.ts";
const { collect } = iterable;

Collect all values of an iterable into an array. WARNING: If the iterable is infinite then this will cause the program to hang indefinitely.

Parameters

ta: Iterable<A>

Returns

ReadonlyArray<A>