Skip to content

Q1CHENL/ocaml-basics

Repository files navigation

OCaml Basics

OCaml Key points

  • In OCaml, everything has a value, and every value has a type.
  • OCaml has type inference. It automatically determines the type of an expression without much guidance from the programmer.
  • In OCaml, if … then … else … is not a statement; it is an expression.
  • Values can be given names using the let keyword. This is called binding a value to a name.
  • Bindings in OCaml are immutable, meaning that the value assigned to a name never changes. -Names can be defined locally, within an expression, using the let … = … in … syntax:

About

OCaml Basics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages