DocsPlaygroundBlogCommunityPackages
  • Playground
  • Blog
  • Community
  • Packages
  • X
  • Bluesky
  • GitHub
  • Forum
Language ManualAPISyntax LookupReact

Syntax Lookup

Enter some language construct you want to know more about.
This is a placeholder.

Placeholders may be used for ignoring parts of values (including serving as a catch-all in switch statements), and specifying the position of an argument.

Example: Ignoring values

ReScriptJS Output
switch person1 {
| Teacher(_) => Console.log("Hi teacher")
| Student(_) => Console.log("Hey student")
}

Example: Specifying an argument position

ReScriptJS Output
let greet = (greeting, name) => greeting ++ " " ++ name

// Pipe the value "John" into the second argument of the greet() function.
let greetJohn = "John"->greet("Hello", _)

References

  • Ignore part of a value

  • Pipe placeholders

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on