This page provides links to some free material that is based on the Real-World Functional Programming book. Some content from first three chapters of the book was adapted as MSDN articles and is now freely available online. In addition, there are two sample chapters available from Manning and some excerpts published while working on the book. The source code is also available online and contains many useful demos and commented samples.
The following two chapters are available as free samples from the book:
- Chapter 4: Exploring F# and .NET libraries by example shows a first real-world application implemented in F#. It uses various .NET and F# libraries to implement a program for drawing pie charts. You’ll also see how to efficiently use the tools F# provides during the development process.
- Chapter 12: Sequence expressions and alternative workflows The chapter starts by showing how we can work with collections of data using. We’ll introduce F# sequence expressions, which are designed for this purpose and look how this feature relates to LINQ. However, you’ll also see that this isn’t a built-in feature unlike its closest counterpart in C# – it’s an example of a more general ability to change what code means that is called computation expressions (or monads).
The following articles were published as chapter excerpts while working on the book. The articles are based on early versions of the book, so they may contain more bugs, but they represent some important features of the book.
- Programming user interfaces using F# workflows (dotnetslackers.com)
F# asynchronous workflows can be used to solve a wide range of programming problems. In this article we’ll look how to use asynchronous workflows for elegantly expressing the control flow of interaction with the user. We’ll also look at clear functional way for encoding drag&drop-like algorithm.
- Tracking dependencies and side-effects using immutability (codeproject.com)
The Functional Programming for the Real World book explains essential concepts of the functional programming paradigm using examples in C# 3.0 and F#. In this article we look at one very important advantage of using one of the core functional concepts – immutability.
- Immutable data structures in C# and F# (codeproject.com)
The Real World Functional Programming book explains essential concepts of this paradigm using examples in C# 3.0 and F#. In this article we look at immutability, which stands behind the clarity of functional programs.
- Declarative programming style (codeguru.com)
In this article, I’ll talk about two properties of functional languages that together define the overall style of writing functional code – recursion and higher-order functions. These two concepts together define what a declarative programming style is, so after discussing them, we’ll talk about the benefits of this style.
- Functional Programming in .NET using C# and F# (Manning Greenpaper)
This article looks at several aspects of functional programming and how the same concepts, which are essential for the functional paradigm, look in the F# and in C# 3.0 with LINQ. We will shortly look at the basic programming language features like lambda functions and type inference that are now available in both F# and C#.