Preface
- Contents
- F# Software Foundation
- About the author
Acknowledgments
Getting Started
- Setting up your environment
- One Last Thing
1 - An Introductory Domain Modelling Exercise
- The Problem
- Getting Started
- Making the Implicit Explicit
- Going Further
- Alternative Approaches (1 of 2)
- Alternative Approaches (2 of 2)
- Summary
- Postscript
2 - Functions
- Getting Started
- Theory
- In Practice
- Unit
- Anonymous Functions
- Multiple Parameters
- Partial Application (Part 1)
- The Forward Pipe Operator
- Partial Application (Part 2)
- Summary
3 - Null and Exception Handling
- Null Handling
- Interop With .NET
- Handling Exceptions
- Function Composition With Result
- Summary
4 - Organising Code and Testing
- Getting Started
- Solutions and Projects
- Adding a Source File
- Namespaces and Modules
- Writing Tests
- Writing Real Tests
- Using FsUnit for Assertions
- Summary
5 - Introduction to Collections
- Before We Start
- The Basics
- Core Functionality
- Folding
- Grouping Data and Uniqueness
- Solving a Problem in Many Ways
- Working Through a Practical Example
- Summary
6 - Reading Data From a File
- Setting Up
- Loading Data
- Parsing Data
- Testing the Code
- Final Code
- Summary
7 - Active Patterns
- Setting Up
- Partial Active Patterns
- Parameterized Partial Active Patterns
- Multi-Case Active Patterns
- Single-Case Active Patterns
- Using Active Patterns in a Practical Example
- Summary
8 - Functional Validation
- Setting Up
- Solving the Problem
- Where are we now?
- Functional Validation the F# Way
- Summary
9 - Single-Case Discriminated Union
- Setting Up
- Solving the Problem
- Using Modules
- A Few Minor Improvements
- Using a Record Type
- Summary
10 - Object Programming
- Setting Up
- Class Types
- Interfaces
- Object Expressions
- Encapsulation
- Equality
- Summary
11 - Recursion
- Setting Up
- Solving The Problem
- Tail Call Optimisation
- Expanding the Accumulator
- Using Recursion to Solve FizzBuzz
- Quicksort using recursion
- Recursion with Hierarchical Data
- Other Uses Of Recursion
- Summary
12 - Computation Expressions
- Setting Up
- Introduction
- The Result Computation Expression
- Introduction to Async
- Compound Computation Expressions
- Debugging Code
- Further Reading
- Summary
13 - Introduction to Web Programming with Giraffe
- Getting Started
- Using Giraffe
- Creating an API Route
- Creating a Custom HttpHandler
- Creating a View
- Adding Subroutes
- Reviewing the Code
- Summary
14 - Creating an API with Giraffe
- Getting Started
- Our Task
- Sample Data
- Routes
- Handlers
- Using the API
- Summary
15 - Creating Web Pages with Giraffe
- Getting Started
- Configuration
- Adding a Master Page
- Creating the Todo List View
- Loading Data on Startup
- Summary
Summary
- F# Software Foundation
- Resources
- And Finally
Appendix 1
- Creating Solutions and Projects in VS Code
Appendix 2
- CSS and JavaScript for Chapter 15