Best F# Programming Books For Teaching Yourself From Scratch

Programming Resources This post may contain affiliate links (read more)

The versatility of F# makes it a fantastic language for any purpose whether software development, hardware/tech drivers, or even web development compiling into JavaScript.

But without prior experience it can be tough learning F# on your own. Thankfully pro developers are happy to share their tips in programming books to help you along the way.

In this post I’ve shared the absolute best F# programming books ranging from complete beginner topics to more advanced lessons. Regardless of your skillset or what you’re trying to learn I guarantee there’s a book here that can help you improve.

programming fsharp book

Best Intro F# Book

If you’re just getting started with F# there is a lot to learn. But teaching style makes a world of difference which is why I recommend Programming F# for complete novices.

This book is currently in its second edition with almost 500 pages full of exercises. The writing style is easy to relate to and even though it’s currently one version behind the current F# release, the exercises in this book still teach well regardless of version number.

 

The Book of F#

book of f#

There’s a lot to learn in F# programming and The Book of F# intends to educate you on all of it. The book’s author Dave Fancher has over a decade’s worth of experience building on .NET. He’s a big proponent of visual F# and he’s one of the best instructors to be writing an F# book.

You’ll learn about all the basic F# features like pipelining, currying, functional delegation, type inference and pattern matching. He teaches how to handle modules and data sets for common problems that you’ll face along the way.

The book’s organization is very clear with each chapter covering a different method or programming technique. Dave introduces topics with theory and eventually merges them with a few practical examples.

I found this book to be very technical so it can be tough for complete beginners with no functional programming practice. However if you’re really dedicated and need to get into F# then this book won’t leave you hanging.

 

Friendly F#

friendly f#

If you need a cheaper intro book with a hands-on experience then you might like Friendly F#. This book covers everything for F# development and uses some fun examples to push you through the learning process.

The authors teach you how to build custom simulations for games including AI and basic physics engines. Each chapter takes one problem at a time and teaches you how to solve the problem using F#. You’ll learn some great techniques and sample workflows that can apply to any level of F# development.

I’d recommend this book to anyone with little prior programming experience. It certainly helps if you know about functional programming and how it works. But you do not need to be an expert in anything to work through these lessons.

This book is only 200 pages long so it can seem a tad short. But the topics are covered in great detail and by the end you’ll feel a lot more comfortable writing F# code from scratch.

 

Functional Programming Using F#

functional programming f#

The F# language is one of a handful that allow functional programming along with OOP programming. Both styles have their place and they’re both equally as challenging to learn.

Functional Programming Using F# explains the basics of functional programming and how this is used to modern development. The authors cover application functions, database systems, and more complex features on top of the .NET library.

You’ll learn about imperative programming with F# and asynchronous development. The book sports 300+ pages full of exercises along with free source code on the publisher’s website.

I wouldn’t recommend this as a complete newbie’s guide to F#. It is very technical and it only covers the functional programming side of F#.

But if all you need to learn is functional programming then this book can be invaluable to your learning process.

 

Programming F#

programming f#

Programming F# is currently in its second edition and is one of the most popular introductory books for F# development. The author Chris Smith and the team at O’Reilly put a lot of work into this 470 page tome of modern development techniques.

Currently the book covers F# v3.0 which is one behind the current version. However all the core features are still the same and the writing style in this book is phenomenal.

You can pick up this title with little-to-no prior experience in functional programming and still work through the chapters with ease. You’ll learn about OOP techniques, F# dev tools, and the libraries for F# .NET.

With Programming F# you can literally go from a complete novice to a competent intermediate-level programmer with exemplary knowledge of the language. You’ll get plenty of practical exercises but Chris also shares the theory behind F# development to improve your workflow and understanding of the language.

Really awesome book and definitely one of the best choices for developers. I’m still hoping O’Reilly will release an update for v4.0 covering changes in the new version.

 

F# Deep Dives

f# deep dives

This is an exceptionally unique book because it offers F# solutions to common problems shared by expert programmers. F# Deep Dives spans 372 pages full of advice and solutions from professional developers working with F# on a regular basis.

Each chapter looks into a different problem and the solutions are provided by a range of developers from around the world. You’ll not only learn how to solve problems like data visualization or domain-specific development. But you’ll also learn how to approach problems while working in F#.

I have to say this is an incredible book. It covers a lot of ground and it’s really unique in the presentation style + content organization structure.

However it is far from a beginner’s book and may even go over the head of intermediate-level F# programmers.

I’d specifically recommend this to competent developers who love F# programming and want a deeper look into how professionals solve their problems.

 

Building Web, Cloud, and Mobile Solutions with F#

building mobile solutions

If you’re building apps with F# then you’ll need the .NET framework every step of the way. But you’ll also want a guide to help you maneuver the many obstacles that pop up during F# development.

I’m quite fond of Building Web, Cloud, and Mobile Solutions with F# written by a Microsoft-awarded F# MVP Daniel Mohl. In this book Daniel shares tips and techniques for building applications for any platform.

You’ll learn about distributed systems and concurrency with F# development. He also shares advice for the .NET framework and other F# libraries to help you build scalable applications that just work.

Later chapters get into server environments with Windows Azure and even frontend technologies like jQuery Mobile. But the overall goal is to help you build scalable applications that work on all platforms and offer the best performance across the board.

This book is a tad short with only 176 pages. But for its specific topic I think it hits the nail on the head. If you want to use F# for real application development then this book should already be on your bookshelf.

 

F# for Machine Learning Essentials

f# for machine learning

In a recent post I covered the best machine learning books that can teach you everything there is to know about AI, machine learning, and big data processing. You can do that stuff with any programming language and F# is just another option to use.

F# for Machine Learning Essentials assumes prior knowledge of F# development and some understanding of functional programming. The book is just under 200 pages but it’s perfect for aspiring F# programmers and/or data scientists who want to work in machine learning.

Each chapter covers a different technique and the lessons are very practical for studying F# design patterns. You’ll learn how to build a batch of classification systems and how to work with mathematical operator libraries such as Math.NET.

I find most of the examples are a little verbose or disconnected from real-world projects. Most of the exercises can apply to the real world, but they’re not directly related to practical projects.

However this book is still a terrific intro to F# development for machine learning. If you already have some functional programming knowledge you can pick up this book and learn a hell of a lot real quick.

 

Testing with F#

testing with f#

It may seem weird that an entire book would be written about testing and debugging a programming language. But there are many different tools and best practices for unit testing and they all work in different environments.

Testing with F# by Mikael Lundin covers unit testing and F# debugging for a variety of scenarios. You’ll learn about many different programming environments and testing tools like FsCheck and TickSpec for behavior-driven development.

Each chapter covers a bit of theory but really pushes you to get your hands dirty with real examples. You’ll learn how to test databases without jeopardizing existing data and how to run tests locally in your own web browser.

This is a brilliant F# book targeted towards intermediate-to-advanced users. There’s no way you can pick this up with zero knowledge of F# or functional programming. Make sure you already feel comfortable with the language first.

But unit testing should be a big part of your workflow and this book will teach you everything you need to know about F# testing & debugging.

 

Expert F# 4.0

expert f# 4

This is a very special F# programming book because one of the authors Don Syme is actually the creator of the F# language. Expert F# 4.0 spans almost 600 pages long and it’s full of advanced techniques for professional F# development.

You’ll learn about new tools and workflows that can expedite your programming experience on all three major operating systems. This book also teaches problem solving techniques when analyzing existing code, or when trying to create something from scratch.

How you write your code directly affects the performance and behavior of your application. This book assumes you already know the basics of F# and are now looking for ways to optimize how you write code.

I simply cannot recommend a better book for advanced developers. You’ll be learning from the actual creator of F# and you can apply these techniques directly into your workflow for any project.

 

Learning F# Functional Data Structures and Algorithms

f# functional data

When you get into more complex applications that require data structures you’ll want to know how to organize them properly. Most devs already know about algorithms but these can change dramatically from project-to-project.

Learning F# Functional Data Structures and Algorithms starts from the very beginning with functional programming topics in F#. You’ll learn how to apply this knowledge to existing data structures and how to analyze open source code shared by other programmers.

Once you learn how to read professional code for existing libraries you’ll be able to create your own. This includes hand-made data structures and reusable libraries with extendable features. The author goes into great detail about data structures for F# teaching you how to analyze what’s out there & how to create your own.

By the end of this book you’ll be looking at F# in a whole new light. These topics are not for the faint of heart and you must be comfortable with functional programming before even attempting these lessons.

But if you’re ready to push into data structures for general F# programming I can’t think of a better resource.

 

F# 4.0 Design Patterns

f# design patterns

When first getting started with F# you’re mostly concerned with the basics. Once you go beyond these to start building real applications you’ll need to consider best practices for your codebase.

F# 4.0 Design Patterns by Gene Belitski covers 300 pages full of functional and object-oriented programming patterns for optimal performance. You’ll learn tips for abstraction and techniques for improving resource consumption that make F# development a breeze.

Your applications will really fly and you’ll have the power to fix them if they don’t. This book teaches through practical exercises that force you to solve problems with efficiency in mind. The author talks about first-order and higher-order functions in relation to your overall codebase.

There’s no denying that this is a valuable book. But this is only useful to developers who have experience writing code yet aren’t sure how to architect their applications.

As long as you understanding the basics of F# programming and know how to build applications from scratch then you’ll be able to follow this book with ease.

 

F# for Quantitative Finance

fsharp quantitative finance

Even if you know absolutely nothing about mathematical finance this book can still be a really interesting read. F# for Quantitative Finance shares tips and recipes for calculating algorithms, trading frequencies, statistics, and macroeconomic indicators using F#.

The entire book relies on Visual Studio and the .NET library. You’ll learn how to build mathematical models of real world financial markets and indices. This includes calculating certain variables in market swings and pre-trading risks for the near future.

If you’re interested in quantitative finance I would highly recommend this book. It’s incredibly detailed and the lessons are exquisite.

However you will not like this book if you’re not much of a math nerd. You can pick this up with little-to-no experience in finance just so long as you actually like math.

So I’d recommend this to semi-experienced F# developers who want to delve into mathematical equations modeled after real-world finance. This book offers a unique take on F# development while still adhering to the basic syntax that you learn along the way.

 

F# High Performance

fsharp high performance

I’m a huge fan of practical real-world exercises that teach by example. That’s why F# High Performance is such a great book for anyone that wants to bring their F# skills to the next level.

This book covers everything you need to know about optimization and performance before writing any code. You’ll learn through live examples by studying bottlenecks and learning how to correct them. From here you’ll learn how to avoid these common mistakes in your own work and save yourself some time during development.

You’ll also learn about custom tracking for CPU and memory usage on any machine. Every metric can be improved if you know where to look and how to identify the problem areas in your code.

But the real way to learn is through practice and repetition; two things this book has in spades.

Before reading this book you will need prior experience writing F# and you should be comfortable enough to build your own applications without tutorials. If you’re at this level and want to further optimize your code then I’d highly recommend snagging a copy.

 

F# 4.0 Programming Cookbook

fsharp cookbook

If you’re looking for a resource guide on F# programming then this cookbook just might fit the bill. The F# 4.0 Programming Cookbook covers the newest version of F# with custom recipes for solving common problems, algorithms, and code optimizations for better performance.

Each chapter covers a different technique and you can easily jump around based on your needs. You’ll learn how to scale a microservice with F# and how to follow a reactive programming methodology. This book merges code snippets with workflows to help you improve from all angles.

Most chapters offer custom examples that you can test and improve upon to learn more. The author covers security in great detail and the solutions in this book dip into every side of F# programming.

This is another higher-level programming book and it’s meant specifically for intermediate-to-advanced developers. If you’re comfortable with F# and want a handy desk reference full of best practices then I would highly recommend this cookbook.

It covers such a large variety of sample projects and F# libraries that you’ll be referencing this cookbook for years to come.


If you know exactly what you’re trying to learn it gets a lot easier picking the right materials.

Absolute beginners probably have no idea where to get started with F# development. I’d personally recommend Programming F# if you can get over the slightly outdated version number. But if you want something a little newer check out Friendly F# instead.

Whether you’re trying to build scalable F# webapps, improve your F# unit testing, or apply F# to machine learning, i guarantee there’s a book here for you.