What you will learn in Functional Programming in C#, Second Edition
Chapter by chapter
Chapter 1: Introducing functional programming
The introduction presents functional programming as a different way of thinking about programs from the mainstream imperative paradigm.
What you learn in chapter 1 →Chapter 2: Thinking in functions
The introduction defines higher-order functions and relates them to first-class functions and abstraction.
What you learn in chapter 2 →Chapter 3: Why function purity matters
The introduction identifies pure functions as functions without side effects and previews their relevance to real-world programming.
What you learn in chapter 3 →Chapter 4: Designing function signatures and types
The introduction explains why function signature design and type design are closely connected in functional programming.
What you learn in chapter 4 →Chapter 5: Modeling the possible absence of data
This introduction identifies optional data as a type-design problem and presents Option as the functional alternative to null.
What you learn in chapter 5 →Chapter 6: Patterns in functional programming
The introduction frames recurring functional operations as reusable patterns that apply across different structures.
What you learn in chapter 6 →Chapter 7: Designing programs with function composition
The introduction connects functional programming’s extensive use of composition with LINQ’s concise list-processing API.
What you learn in chapter 7 →Chapter 8: Functional error handling
This introduction contrasts exception-based error handling with representing success or failure as a returned value.
What you learn in chapter 8 →Chapter 9: Structuring an application with functions
This introduction explains how partial application specializes parameterized functions and previews its role in composing applications from functions.
What you learn in chapter 9 →Chapter 10: Working effectively with multi-argument functions
This introduction frames the challenge of using multi-argument functions with effectful types and recalls the effects those types represent.
What you learn in chapter 10 →Chapter 11: Representing state and change
This introduction contrasts modeling real-world change by mutating an existing object with representing each observation as a new value.
What you learn in chapter 11 →Chapter 12: A short introduction to functional data structures
This introduction motivates immutable data structures and explains why creating a changed collection need not mean copying every element.
What you learn in chapter 12 →Chapter 13: Event sourcing: A functional approach to persistence
This introduction applies functional immutability to persisted data and contrasts assertion-based and event-based append-only storage.
What you learn in chapter 13 →Chapter 14: Lazy computations, continuations, and the beauty of monadic composition
This introduction presents composition independently of execution as a common idea behind the chapter’s approaches to computations.
What you learn in chapter 14 →Chapter 15: Stateful programs and stateful computations
The introduction defines stateful programs by contrasting their behavior with stateless programs.
What you learn in chapter 15 →Chapter 16: Working with asynchronous computations
This introduction explains the basic purpose of asynchrony and distinguishes a single asynchronous value from an asynchronous sequence.
What you learn in chapter 16 →Chapter 17: Traversable and stacked monads
This introduction connects familiar containers with their effects and motivates combining different containers.
What you learn in chapter 17 →Chapter 18: Data streams and the Reactive Extensions
This introduction explains data streams and reactive programming through examples and identifies Reactive Extensions as a library set for working with IObservables.
What you learn in chapter 18 →Chapter 19: An introduction to message-passing concurrency
This introduction connects shared mutable state with concurrency hazards and defines agent-based concurrency in terms of message passing and state ownership.
What you learn in chapter 19 →Concepts explained in this book
- mapMap is an operation that applies a function to values in a structure and returns the results in the same kind of structure.
- optionAn option type represents either the presence of a value or its absence through distinct alternatives such as Some and None.
- actorAn actor is a message-processing entity in the actor model that communicates with other actors by sending messages.
- bindSequence bind applies a function returning a sequence to each element and flattens the resulting sequences into one sequence.
- partial applicationPartial application is the creation of a function with fewer arguments by fixing one or more arguments of a multi-argument function.
- event sourcingAn event-sourced system persists state-changing events that can be replayed to reconstruct its state.
- pure functionA pure function's result depends only on its inputs and it has no observable side effects.
- validation resultA validation type represents either a successful value or one or more errors, allowing errors from multiple checks to be collected.
- function compositionFunction composition constructs a new function by combining functions so that one function's output feeds another's input.
- state mutationState mutation is the modification of program state or a data structure after it has been created.
- ApplyApply applies a function in a computational context to an argument in that context, returning the result in the context.
- observableObservable is a static .NET class that provides methods for creating and operating on observable sequences.
- functional, stateless philosophyFunctional programming is a programming paradigm that builds programs by composing functions and favors functions whose behavior depends only on their inputs.
- side effectAn observable consequence of a function beyond computing its output, such as changing state, throwing an exception, or performing I/O.
- eventAn event is the example application's record of an account state transition that can be persisted and published.
- type signatureA function signature is the description of a function's input and output types that specifies its callable contract.
- higher-order functionA higher-order function is a function that takes one or more functions as arguments or returns a function as its result.
- EitherEither is a sum type whose values hold one of two alternatives, commonly representing a success value or an error.
- stateInformation held by a program or computation that may change as execution proceeds.
- lazy evaluationA lazy computation is a computation whose work and result are deferred until needed.
- functionA function is a computational unit that maps inputs to an output.
- immutabilityImmutability is the property of data or an object whose observable state cannot be changed after creation.
- curryingCurrying transforms a function that takes multiple arguments into a sequence of unary functions.
- mutable shared stateShared mutable state is changeable program state accessible to multiple parts of a program or concurrent computations.
- traverseA traversal operation that uses applicative composition to combine effects from applying a function to each item.
- middlewareA generic delegate type representing middleware that wraps or composes an operation in a pipeline.
- monadA computational structure that provides operations for composing computations in a context, including operations commonly called Bind and Return.
- state transitionA state transition is a change from an entity's current state to a resulting state.
- first-class functionA programming-language feature that allows functions to be treated like values, including being assigned, stored, and passed as arguments or returned.
- Func<T>Func is a family of .NET generic delegate types representing functions with input parameters and a return value.
- functorA type equipped with a mapping operation that applies a function to its contained values without changing the type’s structure or producing side effects.
- parallelismParallel execution is the execution of multiple parts of a computation at the same time, typically on separate processing resources.
- returnA return function lifts a value into a computational context without otherwise transforming it.
- stateful computationA stateful computation takes a state and potentially other arguments, then returns a new state and potentially a result.
- someSome is the presence alternative of an option type, containing a value.
- applicative functorAn applicative functor is a functor that supports applying a function in a computational context to a value in that context.
- message passingMessage passing is communication between concurrent processes by sending messages rather than directly accessing one another’s state.
- continuationA continuation represents the remaining computation, typically as a function that receives a value and proceeds from it.
- dependency injectionA software design pattern in which a component receives the dependencies it needs from an external source rather than creating them itself.
- impure functionA programming function whose result can depend on context or that produces observable effects beyond returning a value.
- immutable linked listAn immutable list is an ordered collection whose contents cannot be changed after creation.
- result typeA result type representing either a successful value or an exception.
- Task<T>Task<T> is a .NET type representing an asynchronous operation that returns a result of type T.
- lambdaA lambda expression is an anonymous function expression that can be converted to a compatible delegate or expression tree in C#.
- TryTry is a book-library generic delegate type representing a computation that returns a value of type T or may throw an exception.
- MatchMatch consumes an Option by handling its alternatives through supplied functions or actions.
- workflowThe example application's sequence of operations composed from functions exposed by lower-level components.
- concurrencyThe execution of multiple computations during overlapping periods of time.
- query sideThe part of a command-query architecture responsible for reading data and populating client-facing views.
- IAsyncEnumerable<T>IAsyncEnumerable<T> is a .NET interface for asynchronously enumerating a sequence of values of type T.
- property-based testingA property-based test checks a general property across generated or supplied input values.
- LINQ query syntaxA LINQ query expression is a C# expression written in query syntax that describes operations over a data source.
- event historyAn event history is the ordered record of events associated with an entity, from which its state can be reconstructed.
- delegateA C# delegate instance is a type-safe reference to one or more compatible methods.
- view modelA view model is a data structure that presents information in a form suited to display in a user interface.
- actor modelThe actor model is a concurrency model in which actors communicate by exchanging messages and can be distributed across processes or machines.
- query patternThe method pattern that enables types to be used in LINQ query expressions by providing the required query operators.
- invariantAn invariant is a condition that must remain true for a program object or system to be valid.
- AggregateEnumerable.Aggregate is a LINQ extension method that repeatedly applies an accumulator function to the elements of a sequence.
- FsCheckFsCheck is a .NET property-based testing framework that generates test inputs and runs tests against them.
- modularityA software design principle in which a system is composed of discrete, reusable components.
- foreachAn operation that applies an action to each element of a structure, typically for its side effects.
- I/OInput/output (I/O) comprises operations through which a program reads or writes data in communication with external resources or systems.
- pseudo-random number generatorAn algorithmic generator that deterministically produces a sequence of values that appears random.
- pattern matchingPattern matching is a language feature that tests a value against patterns describing its value, type, or structure.
- switch expressionA switch expression is a C# expression that selects a result by matching an input against a set of arms.
- agent-based programmingA style of concurrent programming in which agents own state and access it in a single-threaded way while communicating by messages.
- commandA command is a message representing an action that a client requests a server to perform.
- containerA structure that wraps one or more values and provides operations over those values.
- ReactiveXReactive Extensions (Rx) is a set of libraries for composing asynchronous and event-based programs using observable sequences.
- event storeA software product designed for event-sourced systems that includes event storage and related functionality.
- WhereWhere is a function that retains an Option’s value when its predicate is true and otherwise returns None.
- flatmapSelectMany is a LINQ query operator that projects each element to a sequence and flattens the resulting sequences.
- stateful programA stateful program is a program in which past events influence how new events are treated.
- monad stackA monad stack is a composition of multiple monadic effects represented by nested monadic types.
- sequential processingSequential processing is the handling of operations or messages one at a time in a defined sequence.
- validatorA function that checks a request and returns either the validated command or an error describing a failed check.
- imperative programmingAn imperative program is organized around commands that describe operations and may update state.
- awaitThe C# keyword that suspends an asynchronous method until an awaited operation completes, without blocking the current thread.
- with expressionA C# with expression creates a copy of a record or other supported value and can specify changed members for the copy.
- error handlingError handling is the practice of detecting, representing, and responding to errors in a program.
- elevated valueA value representing an underlying type together with an abstraction that adds an effect, such as optionality, aggregation, laziness, or asynchrony.
- race conditionA race condition is a defect in which a program’s result depends on the timing or ordering of concurrent operations.
- codomainThe codomain of a function is the set of values specified as possible outputs of that function.
- command sideThe command side is the part of an event-sourced system that handles client commands and initiates their processing.
- CQRSCommand query responsibility segregation is an architectural pattern that separates commands that change data from queries that read it.
- SelectSelect is a LINQ extension method that projects each element of a sequence into a new form.
- applicative styleApplicative flow combines computations so that independent failures can be accumulated rather than stopping at the first failure.
- closureA closure is a function together with the captured variables from its surrounding lexical scope that it needs to evaluate.
- adapterAn adapter is a software component that mediates between an application and the outside world or another component.
- function injectionA dependency-injection technique that supplies a function for a component to call when it needs an operation performed.
- parameterized testingA unit test whose inputs are supplied as parameters so that one test definition can check multiple input cases.
- nullable reference typesNullable reference types are a C# feature that uses annotations and compiler analysis to distinguish references that may be null from those that should not be null.
- unit typeA type with a single value, typically used to represent the absence of meaningful data.
- applicative approachAn approach to composing computations in a context by applying a function in that context to an argument in a context.
- layered architectureA software organization principle in which higher-level components depend on lower-level components, not vice versa.
- singly linked listA singly linked list is a linear data structure in which each node points to the next node.
- async streamAn async stream is an asynchronously consumed sequence whose values can become available over time.
- data-operation separationA design approach that keeps data representations separate from the functions that operate on them.
- data-oriented programmingA programming paradigm that reduces application complexity by separating logic from data and favoring generic data representations.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
