- 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:
-
Notifications
You must be signed in to change notification settings - Fork 0
Q1CHENL/ocaml-basics
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
OCaml Basics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published