Function
Static Public Summary | ||
public |
Binding(): * |
|
public |
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 |
runs a function on |
|
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 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
Return:
* |
public Inverse(fn: *): * source
import Inverse from 'elista/es6/Inverse.js'
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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 Task(fn: *, args: ...*): * source
import Task from 'elista/es6/Task.js'
Params:
Name | Type | Attribute | Description |
fn | * | ||
args | ...* |
Return:
* |