Language concepts

Reusable function transformation

Try the free JavaScript compiler

Separates control flow from supplied callable behavior. Define which arguments are forwarded and whether effects are allowed.

Formal Syntax & Structure

javascript syntaxjavascript
const transform = (f, x) => f(x)

Working Example

Example Snippetjavascript
const transform=(f,x)=>f(x);console.log(transform(n=>n*4,2));
JavaScript Reference