← Back to index
function CollGen

Creates a collection of given length with items generated by given function.

Examples
🔗

Example 1

import { assertEquals } from "std/assert/mod.ts";
import { CollGen, Coll } from "./collection.ts";

assertEquals(CollGen(3, () => 1), Coll(1, 1, 1));
Type Parameters
Parameters
🔗
count : number
🔗
generator : () => T
Return Type