Home Reference Source Repository

Function

Static Public Summary
public

Binding(): *

public

Either(onPresent: Function, onEmpty: Function): *

Branches a functional tree on an <Empty> check if is it <Empty> it calls onEmpty, otherwise it calls onSomething

public
public

Identity(): *

public

Inverse(fn: *): *

public

Maybe(fn: Function): *

runs a function on this when this isn't <Empty>

public
public

Task(fn: *, args: ...*): *

public

isArray(): *

public

isBoolean(): *

public

isFalse(): *

public

isFunction(): *

public

isNumber(): *

public

isObject(): *

public

isPromise(): *

public

isString(): *

public

isTrue(): *

Static Public

public Binding(): * source

import Binding from 'elista/es6/Binding.js'

Return:

*

public Either(onPresent: Function, onEmpty: Function): * source

import Either from 'elista/es6/Either.js'

Branches a functional tree on an <Empty> check if is it <Empty> it calls onEmpty, otherwise it calls onSomething

Params:

NameTypeAttributeDescription
onPresent Function

the function to call when this is <Present>

onEmpty Function

the function to call when this is <Empty>

Return:

*

public Empty(): boolean source

import Empty from 'elista/es6/Empty.js'

Return:

boolean

public Identity(): * source

import Identity from 'elista/es6/Identity.js'

Return:

*

public Inverse(fn: *): * source

import Inverse from 'elista/es6/Inverse.js'

Params:

NameTypeAttributeDescription
fn *

Return:

*

public Maybe(fn: Function): * source

import Maybe from 'elista/es6/Maybe.js'

runs a function on this when this isn't <Empty>

Params:

NameTypeAttributeDescription
fn Function

the function to run

Return:

*

Example:


function updateUsername (name) {
 return DB.User.fetch(id)
  ::Maybe( function () {
      // this only happens if `this` isn't Empty
     this.name = name
   })
}

public Nothing(): boolean source

import Nothing from 'elista/es6/Nothing.js'

Return:

boolean

public Task(fn: *, args: ...*): * source

import Task from 'elista/es6/Task.js'

Params:

NameTypeAttributeDescription
fn *
args ...*

Return:

*

public isArray(): * source

import {isArray} from 'elista/es6/Types.js'

Return:

*

public isBoolean(): * source

import {isBoolean} from 'elista/es6/Types.js'

Return:

*

public isFalse(): * source

import {isFalse} from 'elista/es6/Types.js'

Return:

*

public isFunction(): * source

import {isFunction} from 'elista/es6/Types.js'

Return:

*

public isNumber(): * source

import {isNumber} from 'elista/es6/Types.js'

Return:

*

public isObject(): * source

import {isObject} from 'elista/es6/Types.js'

Return:

*

public isPromise(): * source

import {isPromise} from 'elista/es6/Types.js'

Return:

*

public isString(): * source

import {isString} from 'elista/es6/Types.js'

Return:

*

public isTrue(): * source

import {isTrue} from 'elista/es6/Types.js'

Return:

*