LiP students are expected to fork the repository and push solutions to the exercises on their fork.
Invitation to the Discord server: https://discord.gg/CW84hS82
You can work on these exercises using the online Ocaml playground: Try Ocaml.
- Max of two numbers
- Absolute value
- From type to function #1
- Find a function #1
- Highest card wins
- From type to function #2
- Even and odd
- Comparing fractions
- Reverse a list
- Minimum of a function
- Fibonacci sequence
- Student grades
- Duplicates
- Random list
- From list to string
- Min and max of a function
- Extract an element from a list
- Alternating-even numbers
- Binary search trees
- Deck of cards
- The return of the Pumping Lemma
- List crush
- Longest subsequence
- Ping pong
To work at this project you must have a local installation of OCaml. Look here for minimal instructions.
- A minimal language of boolean expressions
- Boolean expressions with not, and, or
- Typed arithmetic expressions with dynamic type checking
- Typed arithmetic expressions with static type checking
- Untyped arithmetic expressions
- Arithmetic expressions with let bindings and dynamic type checking
- Pure untyped lambda calculus: call-by-value semantics with explicit renaming of bound variables
- Pure untyped lambda calculus: normal order semantics with explicit renaming of bound variables, and Church numerals
- Simply typed lambda calculus: call-by-value semantics and static type checking
- OCaml Programming: Correct + Efficient + Beautiful
- B. Pierce. Types and Programming Languages. MIT Press, 2002