Overview: Understanding Functional Concepts

Applies to: Functional Programming

Authors: Tomas Petricek and Jon Skeet

Referenced Image

Get this book in Print, PDF, ePub and Kindle at manning.com. Use code “MSDN37b” to save 37%.

Summary: This overview explains the most important concepts of functional programming. It demonstrates what they look like in F# and how they change the way code is written.

This topic contains the following sections.

  • Changing the Way You Think about Code
  • Related Topics

This article is an excerpt from Real World Functional Programming: With Examples in F# and C# by Tomas Petricek with Jon Skeet from Manning Publications (ISBN 9781933988924, copyright Manning Publications 2009, all rights reserved). No part of these chapters may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, electrostatic, mechanical, photocopying, recording, or otherwise—without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews.

Changing the Way You Think about Code

Functional programming is, in many ways, different from what developers are used to in C# or other imperative object-oriented languages. To become a great F# developer, you need to understand just a few basic concepts. The concepts are quite simple but they are needed when thinking about almost everything in F# and functional programming.

The following overview articles discuss the fundamental functional concepts in depth.

Title

Description

Overview: Working with Immutable Data

This overview looks at one of the important functional concepts—immutability. It explains how immutable programs are written and introduces F# concepts such as functions and recursion.

Overview: Programming with Expressions

Functional programs are written as expressions rather than as a sequence of statements. This overview shows examples of this style and demonstrates how this simplifies reasoning about code.

Overview: Understanding Functional Types

F# is a statically-typed language where every expression has a type. This overview explains why we don't need to write types explicitly in F# and also introduces most important types used in functional programming.

To download the code snippets shown in this article, go to https://code.msdn.microsoft.com/Chapter-1-Introducing-F-c967460d

Previous article: Overview: Parallel and Asynchronous Programming

Next article: Overview: Working with Immutable Data