0.3.8 • Published 4 years ago

@typed-f/applicative v0.3.8

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

@typed-f/applicative

NPM Version

Known Vulnerabilities Supported TypeScript Version PRs Welcome

Watch on GitHub Star on GitHub

Applicative implementation for Typed-F

Installation

End user could install this as a dev dependency like

npm install --save-dev @typed-f/applicative
# or
npm i -D @typed-f/applicative

TS library authors should install this as a dependency (not a dev dependency)

# for NPM>=5
npm install @typed-f/applicative
# or
npm i @typed-f/applicative
# for NPM<5
npm install --save @typed-f/applicative
# or
npm i -S @typed-f/applicative

Description

This package includes type definition for applicative type class, which includes

  • unit<T>(value: T): Applicative<T>
  • of: typeof unit
  • ap<T, U>(this: Applicative<T>, wf: Applicative<Fun<[T], U>>): Applicative<U>

(Above type definitions are not accurate one. In here, accurate types are modified for easier understanding.)

For example applicative, see @typed-f/maybe