New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

akh

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akh

Monad and Monad Transformer Collection

  • 0.8.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
547
decreased by-9.29%
Maintainers
1
Weekly downloads
 
Created
Source

Akh

Javascript Monad and Monad Transformer Collection

Overview

Fantasy Land logo

Collection of simple monad and monad transformers that implement Fantasy Land's interfaces.

Monad Transformers

  • IdentityT - akh::trans::identity - Transforms a monad to itself. (Monad, Functor, Applicative Functor)
  • StateT - akh::trans::state - State transformer. (Monad, Monoid, Functor, Applicative Functor)
  • ListT - akh::trans::list - List transformer. (Monad, Monoid, Functor, Applicative Functor)
  • ContT - akh::trans::cont - Continuation transformer. (Monad, Functor, Applicative Functor)
  • DContT - akh::trans::dcont - Delimited continuation transformer. (Monad, Functor, Applicative Functor)
  • EitherT - akh::trans::either - Either transformer. (Monad, Monoid, Functor, Applicative Functor)
  • ErrorT - akh::trans::error - Error transformer. (Monad, Monoid, Functor, Applicative Functor)
  • UniqueT - akh::unique Add unique int to monad (Monad, Monoid, Functor, Applicative Functor)

Monads

  • Identity - akh::identity - Identity computation. (Monad, Functor, Applicative Functor)
  • State - akh::state - Stateful computation. (Monad, Functor, Applicative Functor)
  • List - akh::list - List computation. (Monad, Monoid, Functor, Applicative Functor)
  • Cont - akh::cont - Continuation computation. (Monad, Functor, Applicative Functor)
  • DCont - akh::dcont - Delimited continuation computation. (Monad, Functor, Applicative Functor)
  • EitherT - akh::either - Either computation. (Monad, Functor, Applicative Functor)
  • ErrorT - akh::error - Error computation. (Monad, Functor, Applicative Functor)
  • Trampoline - akh::trampoline Trampolined computation (Monad, Functor, Applicative Functor)
  • Unique - akh::unique Get Unique int (Monad, Monoid, Functor, Applicative Functor)

Install

Node

Node files live in dist_node

$ npm install akh
var List = require('akh').list;

var c =
    List.of(1)
        .chain(function(x) {
            return List.of([x, x + 1])
        })
        .chain(function(x) {
            return List.of([x, x * 2]);
        });

List.runList(c); // [1, 2, 2, 4];

With AMD

Node files live in dist

requirejs.config({
    paths: {
        'bennu': './dist'
    }
});

require(['akh/list'], function(List) {
    ...
});

Contribute

Improvement and additions to Akh are welcome. Please report any issues or send a pull request.

Code

Akh is written in Khepri. Khepri is an ECMAScript derived language focused on functional programming that compiles to Javascript. Khepri sources are in lib directory with node output in dist_node and AMD output in dist.

# Compile all Khepri files
$ npm run build

# Run tests
$ npm test

# While developing, auto compile changed files
$ ./node_modules/.bin/khepri -w lib -o dist_node --package_manager=node

Keywords

FAQs

Package last updated on 25 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc