Programming F# 3.0, 2nd Edition
A Comprehensive Guide for Writing Simple Code to Solve Complex Problems
Publisher: O'Reilly Media
Release Date: October 2012
Pages: 476
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
Why learn F#? With this guide, you’ll learn how this multi-paradigm language not only offers you an enormous productivity boost through functional programming, but also lets you develop applications using your existing object-oriented and imperative programming skills. You’ll quickly discover the many advantages of the language, including access to all the great tools and libraries of the .NET platform.
Reap the benefits of functional programming for your next project, whether you’re writing concurrent code, or building data- or math-intensive applications. With this comprehensive book, former F# team member Chris Smith gives you a head start on the fundamentals and walks you through advanced concepts of the F# language.
- Learn F#’s unique characteristics for building applications
- Gain a solid understanding of F#’s core syntax, including object-oriented and imperative styles
- Make your object-oriented code better by applying functional programming patterns
- Use advanced functional techniques, such as tail-recursion and computation expressions
- Take advantage of multi-core processors with asynchronous workflows and parallel programming
- Use new type providers for interacting with web services and information-rich environments
- Learn how well F# works as a scripting language
Table of Contents
-
Multiparadigm Programming
-
Chapter 1 Introduction to F#
- Getting to Know F#
- Visual Studio 11
- F# Interactive
- Managing F# Source Files
-
Chapter 2 Fundamentals
- Primitive Types
- Comparison and Equality
- Functions
- Core Types
- Organizing F# Code
-
Chapter 3 Functional Programming
- Understanding Functions
- Pattern Matching
- Discriminated Unions
- Records
- Lazy Evaluation
- Sequences
- Queries
-
Chapter 4 Imperative Programming
- Understanding Memory in .NET
- Changing Values
- Units of Measure
- Arrays
- Mutable Collection Types
- Looping Constructs
- Exceptions
-
Chapter 5 Object-Oriented Programming
- Programming with Objects
- Understanding System.Object
- Understanding Classes
- Methods and Properties
- Inheritance
-
Chapter 6 .NET Programming
- The .NET Platform
- Interfaces
- Object Expressions
- Extension Methods
- Extending Modules
- Enumerations
- Structs
-
-
Programming F#
-
Chapter 7 Applied Functional Programming
- Active Patterns
- Using Modules
- Mastering Lists
- Tail Recursion
- Programming with Functions
- Functional Patterns
- Functional Data Structures
-
Chapter 8 Applied Object-Oriented Programming
- Operators
- Generic Type Constraints
- Delegates and Events
- Events
-
Chapter 9 Asynchronous and Parallel Programming
- Working with Threads
- Asynchronous Programming
- Asynchronous Workflows
- Parallel Programming
- Task Parallel Library
-
Chapter 10 Scripting
- F# Script Files
- Directives
- F# Script Recipes
-
Chapter 11 Data Processing
- Indexing
- Querying
-
-
Extending the F# Language
-
Chapter 12 Reflection
- Attributes
- Type Reflection
- Dynamic Instantiation
- Using Reflection
-
Chapter 13 Computation Expressions
- Toward Computation Expressions
- Computation Expression Builders
- Custom Computation Expression Builders
-
Chapter 14 Quotations
- Quotation Basics
- Generating Quotation Expressions
-
Chapter 15 Type Providers
- Typed Data Versus Typed Languages
- Type Providers
-
-
Appendixes
-
Appendix Overview of .NET Libraries
- Visualization
- Data Processing
- Storing Data
-
Appendix F# Interop
- .NET Interop
- Unmanaged Interop
-
-
Colophon