CHAPTER 2

image

Your First F# Program: Getting Started with F#

This chapter will cover simple interactive programming with F#. To begin, download and install F# from fsharp.org, if you don’t have it installed already. The sections that follow use F# Interactive (fsi.exe or fsharpi), a tool you can use to execute fragments of F# code interactively, and that is convenient for exploring the language. Along the way, you will 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 understand it all at first glance, but we will explain ...

Get Expert F# 4.0, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.