λii API

Welcome to λii API Docs

Discover the functional programming interface that makes serverless computations elegant and powerful. This documentation serves as your complete guide to functional programming in the λii ecosystem.

Quick Start

Execute your first lambda function in under 30 seconds:

/**
 * @param {string} input
 * @return {string}
 */
const identity = λ(input) => input

// Execute in browser
λii.execute('identity', 'Hello, λii')

Core Concepts

Functional Composition

Compose functions like mathematical expressions using λ-calculus principles. Immutable operations ensure side-effect-free computations.

const compose = λ(f, g) => λ(x) => f(g(x))
const add1 = λ(x) => x + 1
const multiply = λ(x) => λ(y) => x * y

// Compose operations
const squarePlusOne = compose(add1, multiply)

Type Inference

Automatic type validation for all functions based on Hindley-Milner type system. Type signatures are inferred at runtime.

/**
 * @param {number} a
 * @param {number} b
 * @return {number}
 */
const divide = λ(a) => λ(b) => a / b

// Type system ensures
λii.validate(divide(10)(2)) // Valid
λii.validate(divide(10)("2")) // Type Error