
In this video I introduce the course as whole, and describe who can benefit from it and what they'll need to get started.
This video also has all the source code you'll need to download in order to complete the course.
In this video I introduce the main software tools we'll need: Visual Studio Code, .NET and Ionide.
In this video I show in detail how to install .NET, Visual Studio Code and Ionide onto a Windows based PC.
In this video we install a VS Code extension which helps to pair up brackets.
We also look at the way in which I'll introduce exercises through the rest of the course.
In this video we create a new F# program with the dotnet new command.
In this video we learn how to open the files of our program with VS Code. Then we start to explore the F# code which dotnet new created for us.
The video recaps the 'Your First F# Program' and 'Viewing Source Files with VS Code' lessons.
In this video we learn several different ways to run our program. We also learn how to set breakpoints to stop our program and examine the state of its values.
In this video we learn how to control the execution of our F# code using if and else.
We also touch on mutable values and mutation, and learn why and how to avoid them.
This video recaps the 'Conditional Branching with If/Else' lesson.
In this video we learn three ways to repeat a section of your program: indexed for loops, for loops using direct binding of array elements, and the Array.iter function.
We also introduce the concept of the higher order function.
This video recaps the 'Loops and Iteration' lesson.
In this video we learn how to use the forward pipe operator |> to shape our code into pipelines, which take a value and successively apply a series of transformations to produce a final result.
In passing we touch on the concepts of Boolean and unit types.
This video recaps the 'Forward Piping' lesson.
In this video we start to learn in detail about collection functions, such as Array.skip, Array.map, Array.average and Array.averageBy, Array.min and Array.max.
We also see how to nest if/then/else expressions using additional levels of indentation, and how to use System.IO.File.Exists to check if a file exists. We use System.IO.ReadAllLines to read lines from a text file into an array. We learn about namespaces and how to open namespaces to shorten code. We use String.Split to split a string into parts and the float function to convert strings into floating point values. We use a type annotation to resolve a type inference failure.
This video recaps the 'Collection Functions Part 1' lesson.
In this video we learn how to model data using record types. We see how to define a record type, and how to create instances of the type.
We use a module to group together functions with related purposes. We also learn how to define simple functions in-line using lambda functions.
Finally we use Array.sortBy and Array.sortByDescending to sort an array by some value.
This video recaps the 'Record Types' lesson.
In this video we learn how to cope with missing or inapplicable data items using option types. We learn how to create option type instances in a function. We see how to apply a function that returns an option type using Array.choose. We also learn how to use Option.defaultValue to create a default value for an option type instance.
This video recaps the 'Missing Data' lesson.
In this video we learn about some of the different ways you can specify parameters for functions, and supply values for those parameters using arguments. We learn how to specify types for parameters and for return values using type annotations. We learn about tuples, and the difference between tupled and curried parameters. We look at the usefulness and pitfalls of partial application.
This video recaps the 'Arguments and Parameters' lesson.
In this video we learn how to make code more manageable by organizing it into separate files. We learn how to unify code across files using namespaces and how to access functions in namespaces and modules using dot notation. We also look at the significance of file ordering during compilation, how to add files in the right order and how to move them if the order is incorrect.
This video recaps the 'Organizing Projects into Files' lesson.
In this video we learn how to use discriminated unions to describe situations where a data item might fall into one of several mutually exclusive categories. We also see that some but not necessarily all cases of a DU can have an associated payload data item. We also see how to use a match expression to switch the behavior of code depending on which case a discriminated union instance has, and to recover the payload value when there is one.
This video recaps the 'Discriminated Unions' lesson.
In this video we learn how to use pattern matching to branch code and recover values from data types such as integers, strings, arrays and discriminated unions. We also look at how to use anonymous records to improve code that creates and pattern matches on tuples.
This video recaps the 'Pattern Matching' lesson.
Whether it's your first programming language or your twenty-first, F# will transform your experience as a software developer. Requiring nothing more than basic computer literacy, this course teaches you how to write software in F#.
Topics include:
Setting up your environment • Installing .NET • Installing Visual Studio Code • Creating, building and running a console program • Declaring values and functions • Working with arrays, lists and other collections • Conditional branching and looping • Record types • Handling missing data with Option types • Object Orientation • The magic of discriminated unions and pattern matching • Generics • Forward piping • Higher order functions • Lambda expressions
The course uses the free editor VS Code, which the course shows you how to install. The only thing you'll need is a computer running Windows (8, 10 or later).
IMPORTANT NOTE FOR LINUX AND MACOS USERS
This course originally supported all three operating systems: Windows, Linux and MacOS. However the latest version of .NET, version 5, appears to have broken the toolchain for Linux. It will take me some time to establish whether MacOS still works. For this reason I have withdrawn the sections of the course which deal with installation for Linux and MacOS. I may restore these sections in future if the issues are mitigated. Please forgive any lingering references in the course to Linux and MacOS.