Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ahh/src/iterator.ts>Iterator#map

Opinionated idiomatic features for TypeScript.
Go to Latest
method Iterator.prototype.map
import { Iterator } from "https://deno.land/x/ahh@v0.12.1/src/iterator.ts";

Creates an Iterator that yields each item mapped via fn.

Examples

Example 1

import { default as I } from "./iterator.ts";

const iter = I.iter([1, 2, 3]).map((i) => i * 2);

console.log(iter.next());

Parameters

fn: (_: T) => U