Neverending Plethora of Modules

npm

Need private packages and team management tools?Check out npm Orgs. »

akh.codensity

0.0.3 • Public • Published

Codensity for the Akh Javascript Monad Transformer Library

Includes both regular codensity monad Codensity and codensity monad transformer CodensityT.

# To use as standalone package 
$ npm install --save akh.codensity
 
# To use as part of akh library 
$ npm install --save akh

Usage

The codensity monad/transformer implements the Fantasy Land monad and monoid interfaces.

Fantasy Land logo
// Codensity monad
require('akh.codensity').Codensity
require('akh').Codensity
 
// Codensity monad transformer
require('akh.codensity').CodensityT
require('akh').CodensityT

Codensity.run(m, k), m.run(k)

Perform a codensity computation m and complete with outer continuation k.

const Codensity = requre('akh.Codensity').Codensity
 
var c = Codensity.of(3).map(x => -x)
 
Codensity.run(c, console.log) // logs: -3
c.run(console.log)

CodensityT.run(m, k), m.run(k)

Same as Codensity.run but for transformed types

Contributing

Contributions are welcome.

To get started:

cd akh-codensity
$ npm install # install dev packages 
$ npm test # run tests 

install

npm i akh.codensity

Downloadsweekly downloads

122

version

0.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability