Module function

Augmentations for functions.

Remarks

Importing this module

This module's augmentations can be applied by using the following import:

import "@neotype/extensions/function.js";

Combining functions as a semigroup

Functions have the following behavior as a semigroup:

  • A function <TArgs extends unknown[], T>(...args: TArgs) => T implements Semigroup when T implements Semigroup.
  • Combining two functions returns a new function that, when applied, applies the original functions from left to right and combines their results.

Index

Interfaces

Generated using TypeDoc