O'Reilly logo

Expert F# 2.0 by Antonio Cisternino, Adam Granicz, Don Syme

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Getting Started with F# and .NET

This chapter covers simple interactive programming with F# and .NET. To begin, you should download and install a version of the F# distribution from www.fsharp.net. You may also have a version on your machine already. The sections that follow use F# Interactive, a tool you can use to execute fragments of F# code interactively and a convenient way to explore the language. Along the way, you see examples of the most important F# language constructs and many important libraries.

Creating Your First F# Program

Listing 2-1 shows your first complete F# program. You may not follow it all at first glance, but we explain it piece by piece after the listing.

Example 2.1. Analyzing a String for Duplicate Words

/// ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required