Home Reference Source Repository
import Success from 'stools/src/Success.js'
public class | source

Success

Extends:

Monad → Success

Success

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

ap(otherContainer: Monad): Success or Fail

public

cata(failureFn: function, successFn: function): Object

public
public
public

Public Constructors

public constructor(x: Object): Success source

Params:

NameTypeAttributeDescription
x Object

is the value of the Success.

Return:

Success

Public Methods

public ap(otherContainer: Monad): Success or Fail source

Params:

NameTypeAttributeDescription
otherContainer Monad

is a Monad (Fail or Success).

Return:

Success or Fail

public cata(failureFn: function, successFn: function): Object source

Params:

NameTypeAttributeDescription
failureFn function

is a function.

successFn function

is a function.

Return:

Object

public getOrElse(): Object source

Return:

Object

public isFail(): boolean source

Return:

boolean

public isSuccess(): boolean source

Return:

boolean