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

Fail

Extends:

Monad → Fail

Fail

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

ap(otherContainer: Monad): Fail

public

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

public
public
public

map(): Fail

Public Constructors

public constructor(x: Object): Fail source

Params:

NameTypeAttributeDescription
x Object

is the value of the Fail.

Return:

Fail

Public Methods

public ap(otherContainer: Monad): Fail source

Params:

NameTypeAttributeDescription
otherContainer Monad

is a Monad (Fail or Success).

Return:

Fail

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

Params:

NameTypeAttributeDescription
failureFn function

is a function.

successFn function

is a function.

Return:

Object

public isFail(): boolean source

Return:

boolean

public isSuccess(): boolean source

Return:

boolean

public map(): Fail source

Return:

Fail