0.7.0-alpha.2 • Published 7 years ago

lambdash.either v0.7.0-alpha.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Either

This package implements an either type for lambdash.

Installation

Use npm.

npm install --save lambdash.either

Implements

  1. Eq
  2. Ord
  3. Functor
  4. Semigroup (If its right type implements Semigroup)
  5. Monoid
  6. Foldable
  7. Applicative
  8. Monad
  9. Show

Typed Either

By default the Either implementation accepts any value for the left or the right. You can create typed Either like so:

    var _ = require('lambdash');
    var Either = require('lambdash.either')

    // An either that accepts strings on the left and numbers on the right
    var StringOrNumber = Either.Typed(_.Str, _.Num);