Summary Functional Programming in C# teaches you to apply functional thinking to real-world problems using the C# language. The book, with its many. This book aims to show how you can leverage functional techniques in C# to write code that is concise, elegant, robust, and maintainable. Who should read this. WHO THIS BOOK IS FOR The topic of functional programming in C# can be seen from two different angles. On cavosboig.site platform there are many experienced.
- 1. Introducing functional programming
- See a Problem?
- Learn how to write better C# code
- Welcome to Manning India!
- Books & Videos
- Functional Programming in C#
- About this Book
- Editorial Reviews
- Functional Programming in C#: How to write better C# code
Functional Programming in C teaches you to apply functional thinking to real-world problems using the C language. The book, with its many practical examples, is written for proficient C programmers with no prior FP experience. It will give you an awesome new perspective. Functional programming changes the way you think about code. For C developers, FP techniques can greatly improve state management, concurrency, event handling, and long-term code maintenance.
1. Introducing functional programming
And C offers the flexibility that allows you to benefit fully from the application of functional techniques. This book gives you the awesome power of a new perspective. You'll start by learning the principles of functional programming and the language features that allow you to program functionally. As you explore the many practical examples, you'll learn the power of function composition, data flow programming, immutable data structures, and monadic composition with LINQ.
Write readable, team-friendly code Master async and data streams Radically improve error handling Event sourcing and other FP patterns. Enrico Buonanno studied computer science at Columbia University and has 15 years of experience as a developer, architect, and trainer. The author does a fantastic job of organizing the content in a clear and concise manner - with humor.
See a Problem?
If you are an experienced C developer with lots of questions about good code practice and general architecture, this book lifts you to another level. Welcome to Manning India! We are pleased to be able to offer regional eBook pricing for Indian residents. Functional Programming in C. Functional Programming in C How to write better C code. Enrico Buonanno. Register your pBook for a free eBook Logic vs. Functional programming can make your head explode.
This book stitches it back together. Table of Contents takes you straight to the book detailed table of contents. Introducing functional programming 1. What is this thing called functional programming? Functions as first-class values.
Learn how to write better C# code
Writing programs with strong guarantees. How functional a language is C? The functional nature of LINQ. Functional features in C 6 and C 7. A more functional future for C? Thinking in functions 1.
Functions as maps. Representing functions in C. Higher-order functions 1. Functions that depend on other functions. Functions that create other functions. In practice: avoiding duplication with HOFs 1. Encapsulating setup and teardown into a HOF.
Welcome to Manning India!
Turning the using statement into a HOF. Code review: tradeoffs of HOFs. Benefits of functional programming. Why function purity matters 2. What is function purity?
Books & Videos
Purity and side effects. Strategies for managing side effects. Purity and concurrency 2. Pure functions parallelize well. Parallelizing impure functions. Purity and Testability 2. In practice: a validation scenario. Bringing impure functions under test. Why testing impure functions is hard. Purity in the context of changes in computing. Designing function signatures and types 3.
Function signature design 3.
Functional Programming in C#
Arrow notation. How informative is a signature? Capturing data with data objects 3.
Primitive types are often not specific enough. Constraining inputs with custom types. Writing "honest" functions. Composing values with tuples and objects. Modelling the absence of data with Unit 3. Why using void is not ideal. Bridging the gap between Action and Func with Unit. Modelling the possible absence of data with Option 3. The bad APIs you use every day. An introduction to the Option type.
About this Book
Gaining robustness by using Option instead of null. Option as the natural result type of partial functions. Patterns in Functional Programming 4. Applying a function to the inner values of a structure 4.
Mapping a function onto a sequence of values. Mapping a function onto an optional value. Performing side effects with ForEach. Chaining functions with Bind 4. Composing Option-returning functions with Bind. Flattening nested lists with Bind.
Actually, it's called a monad. Relation between functors and monads. Combining Option and IEnumerable with Bind. Coding at different levels of abstraction 4. Regular vs elevated values. Crossing levels of abstraction.
Working at the right level of abstraction. Designing programs with function composition 5. Function composition 5. Brushing up on function composition.
Composition in the elevated world. Thinking in terms of data flow 5. Writing functions that compose well. Programming workflows 5. A simple workflow for validation.
Functional Programming in C#: How to write better C# code
Refactoring with data flow in mind. Composition leads to greater flexibility. An introduction to functional domain modelling.
An end-to-end server-side workflow 5. Expressions vs statements. The functional take on layering.