For example, in Reason, a function is:
let x: (int, int) => int = (a, b) => a + b;
fn x(a, b int): int { a + b }
let x = fn(a, b int): int { a + b }
https://www.typescriptlang.org/play/?#code/DYUwLgBAHgXBAUBDO...
I've seen JS using lambdas instead of classic functions like that in the wild. And that Reason can be made more JS-idiomatic without changes to the syntax:
let x = (a: int, b: int): int => a + b;
For example, in Reason, a function is:
A more JS-like syntax might be: Or at least: