Function

Overview

A Function object has the ability to be invoked or spawned as a Future with a given set of arguments.

Fields

.bind

fn (...args: Any) -> Function

Creates a Function wrapped with the given arguments and context.

.arity

fn -> Number

Gets the minimum expected arguments.

.adicity

fn -> Number

Gets the maximum expected arguments. If the function is variadic it will return the same value as Function.vlimit().

.receiver

fn -> Any

Gets the bound receiver context of a Function.

Statics

.call

fn [F: Function](callback: F, ...args: Any) -> Any

Invokes the callback function with the given arguments.

.apply

fn [F: Function](callback: F, args: List[Any]) -> Any

Invokes the callback function with the given arguments list.

.vlimit

fn -> Number

Gets the fixed variadic arguments adicity.

On this page