Reason
  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages iconPortuguês (Brasil)
    • 日本語
    • English
    • Deutsch
    • Español
    • Français
    • 한국어
    • Русский
    • Українська
    • 中文
    • 繁體中文
    • Ajude a Traduzir
  • GitHub
Hello! This particular page hash has moved to . Please update the URLs to reflect it. Thanks!
Reason
type schoolPerson =
  | Teacher
  | Director
  | Student(string);

let greeting = person =>
  switch (person) {
  | Teacher => "Hey Professor!"
  | Director => "Hello Director."
  | Student("Richard") =>
    "Still here Ricky?"
  | Student(anyOtherName) =>
    "Hey, " ++ anyOtherName ++ "."
  };
type schoolPerson = Teacher | Director | Student(string);

let greeting = person =>
  switch (person) {
  | Teacher => "Hey Professor!"
  | Director => "Hello Director."
  | Student("Richard") => "Still here Ricky?"
  | Student(anyOtherName) => "Hey, " ++ anyOtherName ++ "."
  };
Reason te permite escrever código simples, rápido e seguro de alta qualidade enquanto aproveita os ecossistemas de JavaScript e OCaml.
Testar Online
Quick Start

Tipos sem complicações

Uma inferência de tipos segura e poderosa significa que você raramente tem que anotar os tipos, mas mesmo assim tudo é analisado para você.

Use the power of the OCaml ecosystem

Get access to the powerful systems programming language OCaml with an easier to learn syntax. Use js_of_ocaml to compile to JavaScript!

Usuários do Reason

FacebookMessengerOneGraphViskaBeOpSocial TablesBroadsheetToughbyteg2i.coTinyRungAstrocodersAhrefsDernier CriBacktraceMobilunityAppierInVisionCoursebaseImandra IncTail RecursiveGangverkLaTeX Baseohne-MaklerSotheby's上线了 SXL.CNJoinUpLenus eHealthPupilfirstnittygrittyLeon SoftwarexorlabcodeheroesControl Center AppsruangguruDraftbitQwickReveryOnivim 2O(1) LabsminimaIteamAstrolabe DiagnosticsAuditlessCutiiBand ProtocolRaditycodecentricTradie TrainingPorterOxidizing SystemsTenzir
Ver a Lista Completa