Chapter 3. Meet tuples, lists, and functions in F# and C#

This chapter covers

  • Declaring functions and values
  • Working with immutable tuples and lists
  • Processing lists using recursion
  • Parameterizing processing functions

In chapter 2, we explored the most important concepts of functional programming, but we did this from a high-level perspective. We haven’t shown you any real functional code, aside from quick examples to demonstrate our ideas. Our goal so far has been to illustrate how concepts relate to one another and how the result is a very different approach to programming.

In this chapter you’ll finally get to write functional F# code, but we’ll focus on examples that can be nicely explained and demonstrated using C#. We won’t yet delve ...

Get Real-World Functional Programming with Examples in F# and C# now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.