(x, y) => x + y
((x, y) => x + y)(1, 2)->Js.log // 3
/* with type annotation */
(x: int, y: int): int => x + y
((x: int, y: int): int => x + y)(1, 2)->Js.log // 3
let add = (x, y) => x + y
add(1, 2)->Js.log
/* with function signature */
let add: (int, int) => int = (x, y) => x + y
add(1, 2)->Js.log
/* with paramater type annotation */
let add = (x: int, y: int): int => x + y
add(1, 2)->Js.log
/* with both function signature and paramater type annotation */
let add: (int, int) => int = (x: int, y: int): int => x + y
add(1, 2)->Js.log
let add = (~first, ~second) => first + second
add(~first=2, ~second=2)->Js.log
add(~first=(2: int), ~second=(2: int))->Js.log
/* with punning */
let first = 100
let second = 200
add(~first, ~second)->Js.log
add(~first: int, ~second: int)->Js.log
/* with function signature */
let add: (~first: int, ~second: int) => int = (~first, ~second) => first + second
add(~first=2, ~second=2)->Js.log
/* with paramater type annotation */
let add = (~first: int, ~second: int): int => first + second
add(~first=2, ~second=2)->Js.log
/* with both function signature and paramater type annotation */
let add: (~first: int, ~second: int) => int = (~first: int, ~second: int): int => first + second
add(~first=2, ~second=2)->Js.log
let add = (~first as x, ~second as y) => x + y
add(~first=2, ~second=2)->Js.log
/* with function signature */
let add: (~first: int, ~second: int) => int = (~first as x, ~second as y) => x + y
add(~first=2, ~second=2)->Js.log
/* with paramater type annotation */
let add = (~first as x: int, ~second as y: int): int => x + y
add(~first=2, ~second=2)->Js.log
/* with both function signature and paramater type annotation */
let add: (~first: int, ~second: int) => int = (~first as x: int, ~second as y: int): int => x + y
add(~first=2, ~second=2)->Js.log