Left

Left

Left

Constructor

new Left(val) → {Left}

Source:
Parameters:
Name Type Description
val
Returns:
Type:
Left

Members

type :String

Properties:
Name Type Description
type String Returns the string 'Left' for all Either objects
Source:
Type:
  • String
Example
const m =  Either.of([[1,2],[2,3],[4,5]])
m.type === 'Left'

Methods

ap(b) → {Left}

Source:
Parameters:
Name Type Description
b *
Returns:
Type:
Left

cata(f, _) → {*}

Source:
Parameters:
Name Type Description
f function
_ Placeholder
Returns:
Type:
*

chain(f) → {Left}

Source:
Parameters:
Name Type Description
f function
Returns:
Type:
Left

get()

Source:
Throws:
TypeError

getOrElse(a) → {*}

Source:
Parameters:
Name Type Description
a *
Returns:
Type:
*

isLeft() → {boolean}

Source:
Returns:
Type:
boolean

isRight() → {boolean}

Source:
Returns:
Type:
boolean

map(f) → {Left}

Source:
Parameters:
Name Type Description
f function
Returns:
Type:
Left

toString() → {string}

Source:
Returns:
Type:
string