Value passed to the first function.
The result returned by the last function, or initial when no
functions are supplied.
import { pipe } from '@pacote/pipe'
const doubleSay = (value: string) => `${value}, ${value}`
const capitalize = (value: string) =>
value.charAt(0).toUpperCase() + value.slice(1)
const exclaim = (value: string) => `${value}!`
pipe('hello', doubleSay, capitalize, exclaim)
// => 'Hello, hello!'
// equivalent to exclaim(capitalize(doubleSay('hello')))
Passes initial through functions from left to right.
The result returned by the last function.
Passes a value through a sequence of functions from left to right.