Introduction
type map = <T, U>(fn: (item: T) => U, items: T[]) => U[]
const increment = a => a + 1
const result = map(increment, [1, 2, 3])type map = <T, U>(fn: (item: T) => U) => (items: T[]) => U[]
const increment = a => a + 1
const incrementList = map(increment)
const result = incrementList([1, 2, 3])Installation
Yarn
yarn add @tdreyno/figmentNPM
npm install --save @tdreyno/figmentPrior Art
License
Last updated
Was this helpful?