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

Right

Extends:

ContainerFunctor → Right

Right a sub-type of Either

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

cata(leftFn: function, rightFn: function): Object

public
public
public
public

Inherited Summary

From class Container
public static
From class Functor
public static
public

Public Constructors

public constructor(x: Object): Right source

Override:

Functor#constructor

Params:

NameTypeAttributeDescription
x Object

is the value of the Right.

Return:

Right

Public Methods

public cata(leftFn: function, rightFn: function): Object source

Params:

NameTypeAttributeDescription
leftFn function

is a function.

rightFn function

is a function.

Return:

Object

public getOrElse(): Object source

Return:

Object

public isLeft(): boolean source

Return:

boolean

public isRight(): boolean source

Return:

boolean

public map(fn: function): Right source

Override:

Functor#map

Params:

NameTypeAttributeDescription
fn function

is a function.

Return:

Right