
In This Lecture:
Why OCaml?
What is OCaml?
OCaml Repl
How to follow up with the course?
In This Lecture:
Basic Data Types
OCaml special operands for floats and strings
Precedence
Understand TryOCaml environment, link attached
In This Lecture:
How to write if conditions
Precedence of the if conditional arguments
Does Type Casting exists?
What are the names of expressions?
In This Lecture:
How to define a function and pass arguments to it?
Understand the types inferred on the functions
What is returned if there is no return command?
Functions argument precedence
In This Lecture:
How to declare arrays in OCaml?
How to access arrays elements?
Lists as a predefined data container
Mix lists and arrays
In This Lecture:
Tuples
How they differ from arrays and lists?
Matching or mapping tuple elements
Pairs and their built-in functions
In This Lecture:
Understand the concept of Polymorphism
See how OCaml is strongly typed
In This Lecture 8 :
Build a recursive function
Use match selector
Add wildcard in the match options selector
In This Lecture:
How to match lists in Functions?
How to handle Head and Tail?
Create your own version of standard OCaml functions
Create your Exception comments with "FailWith"
In This Lecture:
Recursion default conditions
Track your function execution
Printf and its unit return
Comments
In This Lecture:
Step by step: How functions consume one argument at a time
In This Lecture:
Anonymous functions
Practice with map function from List Module
Build your own map function version
Understand OCaml inferred typing on functions
In This Lecture:
Build a list insert function
Build a list sort function
Mix the two functions
Call a function from within the recursion of another
In This Lecture:
Pass and match arguments as tuple
Handle "not exhaustive" pattern matching conditions
In This Lecture:
Why and how OCaml is tryin to discourage the usage of for-loops
For-loops examples with lists and arrays
Create a return from OCaml functions
In This Lecture:
Learn OCaml Pointers
Understand the different binding scenarios
Build a while loop that overcomes OCaml limitations upon it
In This Lecture:
Understand the type inferred on built-in functions
Create arguments that match built in functions prerequisites
List.iter and why it need pointers
In This Lecture:
Read and understand OCaml List Module documentation
In This Lecture:
Understand the 3 usages of the default value
Different types of default values
Partial function application with built-in functions
Build your own version of fold_left
In This Lecture:
The difference between fold_left and fold_right
The meaning of argument different arrangement
Folding is not only to sum up functions
The effect of the function passed in argument on function execution
Build a String to character list function
In This Lecture:
Why we may use tail recursion?
Convert recursive functions to tail recursion
Hide the recursion and accumulator
In This Lecture:
Records Syntax
Analogy between records and tuples; Records act as named tuples
How to match the elements inside the records?
In This Lecture:
Custom Type Syntax
Custom types constructors
Create functions using custom types
In This Lecture:
Create Trees
Create Tree of trees
Draw tree
Infer polymorphism
In This Lecture:
Class-Object Syntax
Include methods
Include mutable instance variable
Use your own data type as instance variable
Build and use an interactive class
In This Lecture:
Understand the Queue data structure
Build a queue in OCaml using Class-Object
Print Queue status
Dive into the world of OCaml with this comprehensive crash course designed to get you writing effective OCaml code quickly and confidently. Whether you are new to functional programming or looking to deepen your understanding, this course will guide you through OCaml’s unique syntax and powerful features step-by-step. You will start by mastering OCaml’s basic types, data structures, and operator precedence, building a solid foundation for further learning. Then, explore various function types with a focus on arguments, return values, and how to recreate essential built-in functions yourself.
Gain a clear understanding of OCaml’s strong static type system through practical examples of inferred typing and polymorphism, which are key to writing robust and reusable code. This course also covers OCaml’s multi-paradigm approach, including functional, imperative, and object-oriented programming styles, enabling you to write versatile programs. Learn how to navigate OCaml modules and documentation effectively, empowering you to utilize the language’s rich ecosystem.
With nearly 5 hours of engaging video content, practical exercises, and expert tips, you will develop the skills to solve complex problems, prepare for technical interviews involving functional languages, and apply OCaml concepts in real-world projects. This course is packed with hands-on examples and best practices, making it ideal for beginners and intermediate programmers alike who want to unlock the power of OCaml.