mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-10-08 23:46:20 +02:00
[CD] OCAML basics
This commit is contained in:
1 parent
d0252915fd
commit
5cf2a63e73
1 file changed
+7
@@ -2,3 +2,10 @@ OCAML is a compiled, functional programming language and a descendant of the Met
|
|||||||
In contrast to other functional programming languages (such as Haskell), it is actually used in the wild by more than two people.
|
In contrast to other functional programming languages (such as Haskell), it is actually used in the wild by more than two people.
|
||||||
|
|
||||||
\inputcodewithfilename{ocaml}{}{code/ocaml/00_basics.ml}
|
\inputcodewithfilename{ocaml}{}{code/ocaml/00_basics.ml}
|
||||||
|
|
||||||
|
OCAML is dynamically typed (i.e. types don't \textit{have} to be annotated), but they can be, if you so choose.
|
||||||
|
As with Python and all other languages where type annotation is optional, you are strongly encouraged to annotate types, especially for more complex expressions,
|
||||||
|
as that can massively reduce the likeliness of errors.
|
||||||
|
|
||||||
|
The first graded assignment's first 300 ish lines also give you a very neat overview over how OCAML works,
|
||||||
|
so absolutely read through those.
|
||||||
Reference in new issue
Block a user