Syntax Lookup

Enter some language construct you want to know more about.
This is an uncurried function.

Since 11.0 All functions are uncurried by default now. This syntax is only usable if uncurried is set to false in rescript.json. In uncurried mode it gets formatted away automatically.

With uncurried mode turned off, or before ReScript 11, ReScript functions are curried by default, however in certain cases you may need an uncurried function. In these cases we add a . in the argument list.

When calling uncurried functions, we must also include a . in the argument list.

Example

ReScriptJS Output
let add = (. x, y) => {
  x + y
}

let withCallback = (cb: (. int) => unit) => {
  cb(. 1)
}

References