Skip to content

memorileak/npm-tfunctional-monads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

class Wrapper {
  static of(value) {}
  map(f) {}
  join() {}
  toString() {}
}
class Maybe {
  static just(value) {}
  static nothing() {}
  static fromNullable(value) {}
  static of(value) {}
  join() {}
  isJust() {}
  isNothing() {}
}
class Just extends Maybe {
  value() {}
  map(f) {}
  filter(f) {}
  getOrElse(_) {}
  isJust() {}
  toString() {}
}
class Nothing extends Maybe {
  value() {}
  map(_) {}
  filter(_) {}
  join() {}
  getOrElse(fallbackValue) {}
  isNothing() {}
  toString() {}
}
class Either {
  static left(value) {}
  static right(value) {}
  static fromNullable(value) {}
  static of(value) {}
  value() {}
}
class Right extends Either {
  map(f) {}
  chain(f) {}
  filter(f) {}
  getOrElse(_) {}
  getOrElseThrow(_) {}
  orElse(_) {}
  toString() {}
}
class Left extends Either {
  map(_) {}
  chain(_) {}
  filter(_) {}
  value() {}
  getOrElse(fallbackValue) {}
  getOrElseThrow(message) {}
  orElse(f) {}
  toString() {}
}
class IO {
  static of(value) {}
  static from(effect) {}
  map(f) {}
  chain(f) {}
  run() {}
  toString() {}
}
function liftMaybe(f)(...args) {}
function liftEither(f)(...args) {}
function liftIO(value) {}
function map(f)(container) {}
function filter(f)(container) {}
function chain(f)(container) {}
function orElse(f)(container) {}
function join(joinable) {}
function then(f)(promise) {}
function otherwise(f)(promise) {}
function final(f)(promise) {}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published