Book cover

Manning Publications

This book is published by Manning Publications. You can find more interesting books from them on their web.

Manning Publications

Start Reading Today

You can also start reading now via the Manning Early Access Program!

Manning Early Access

Tomas Petricek

Tomas discovered functional programming as a student at Charles University in Prague. He has been a Microsoft C# MVP since 2004 and is one of the most active members in the F# community. In addition to his work with F#, he has been using C# 3.0 in a functional way since the early previews in 2005. He interned with the F# team at Microsoft Research, and he has developed a client/server web framework for F# called F# WebTools. His articles on functional programming in .NET and various other topics can be found at his web site http://tomasp.net.

Jon Skeet

Jon is a veteran C# and Java developer. His contributions to the software community include thousands of newsgroup posts, hundreds of articles and blog posts, many user group talks, and almost fanatical participation on the Q&A site "Stack Overflow". He was a co-author of Groovy in Action, and more recently wrote the critically acclaimed C# in Depth.

Book News

Book Resources

Functional Programming in .NET

Functional programming languages are astonishing for their ability to express ideas in a succinct, declarative way. In the recent years, they became a compeling alternative thanks to their ability to handle the concurrent programming requirements of multi-processor applications. Many of the functional ideas are now available in main-stream langauges including C# 3.0 and Microsoft recently decided to productize functional .NET language called F#.

Real World Functional Programming written by Tomas Petricek with Jon Skeet explores functional programming through the F# and C# languages and presents the new F# language as well as several advanced C# 3.0 concepts. It shows how functional programming differs from other approaches and explains how the ideas look in their clear form in F# as well as how they can be successfully used to solve programming problems in C#. Moving beyond the theory, this book also provides practical examples that apply functional programming to the day-to-day tasks you face as a .NET developer.

More about the book...

Latest Functional Programming Article

F# Webcast (IV.) - Developing standard .NET libraries

In the previous parts of this webcast series we've developed an F# script that downloads RSS feeds asynchronously and in parallel and searches them for the specified keywords. We followed the usual F# development style, so after introducing the basic functional concepts, we wrote the code in the simples possible style and demonstrated how to use System.Xml and System.Net namespaces. Then we refactored the existing code, to run asynchronously and process the results potentially in parallel, which was very easy thanks to F# asynchronous workflows.

In this part of the series, we'll make the next evolutionary step of our sample application. We'll turn the code that originally used F# tuples and lists into code that uses standard .NET objects and we'll also see how to declare a class in F#. This simple modification will turn the script into an F# library that is almost indistinguishable from a library developed in C#. We'll also look how you can use the library from C# web application to show the interop between C# and F# in practice. We'll start with the code from the previous part, so if you missed that, you may want to check it out or download the source code.

Read the complete article
Tomas Petricek | June 15, 2009

More Recent Articles

  • F# Webcast (III.) - Using Asynchronous Workflows (6/5/2009)

    In the previous part you've seen how to write a simple function for downloading RSS feeds and processing them. In this part, we look how to improve the function to download data asynchronously and process them potentially in parallel.

  • F# Webcast (II.) - Using .NET libraries (6/1/2009)

    This is the second part of the webcast series that introduces the F# language. It shows how to use .NET libraries from F# to download RSS feed and how to work with the obtained data using tuples, sequence expressions and other F# features.

  • F# Webcast (I.) - Introducing functional concepts (5/25/2009)

    Now that Visual Studio 2010 beta 1 is out, it may be a good time finally try the new F# language. To make the exploration easier, I created a web cast series that demonstrates interesting aspects of F#. In this part, we'll look at basic functional concepts and working with data.

  • Imperative computation in F# (II.) - Writing break and continue (4/25/2009)

    In the previous article of this series, we've implemented a computation expression that allows us to write imperative 'return' in F#. In this article, we'll add support for 'break' and 'continue'.

  • Imperative computation in F# (I.) - Returning results from a function (3/19/2009)

    Even though F# supports some imperative constructs such as for and while loops, it doesn't support some of the advanced constructs like imperative return and break. In this series, we'll look how we can implement these constructs ourselves using F# computation expressions.

More articles...