Syntax Lookup

Enter some language construct you want to know more about.

let rec

This is the let rec recursive binding syntax.

Use let rec to define recursive functions.

Example

ReScriptJS Output
let rec factorial = n =>
  if n <= 1 {
    1
  } else {
    n * factorial(n - 1)
  }

References