functional module
Maylang standard-library module.
import "functional" as functional;
Module note — Memoization keys use str(arg); distinct arguments with identical display strings share a cached result.
Functions
identity
fun identity<T>(x: T) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
constantly
fun constantly<T>(value: T) -> (Any) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
compose
fun compose<A, B, C>(f: (B) -> C, g: (A) -> B) -> (A) -> CNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
compose3
fun compose3<A, B, C, D>(f: (C) -> D, g: (B) -> C, h: (A) -> B) -> (A) -> DNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
flip
fun flip<A, B, C>(f: (A, B) -> C) -> (B, A) -> CNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
curry
fun curry<A, B, C>(f: (A, B) -> C) -> (A) -> (B) -> CNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
uncurry
fun uncurry<A, B, C>(f: (A) -> (B) -> C) -> (A, B) -> CNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
apply_n
fun apply_n<T>(f: (T) -> T, x: T, n: Int) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
pipeline
fun pipeline<T>(x: T, fs: List<(T) -> T>) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
compose_all
fun compose_all<T>(fs: List<(T) -> T>) -> (T) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
memoize
fun memoize<T, U>(f: (T) -> U) -> (T) -> UNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
partial_first
fun partial_first<A, B, C>(f: (A, B) -> C, first: A) -> (B) -> CNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source