This repo contains the code samples, exercises and solutions for the book Functional Programming in C# currently available as part of the Manning Early Access Program.
The code samples are organized in the following projects:
- Boc: a long-running example based on a banking scenario
- Examples: shorter examples, organized by chapter and topic
- Exercises: placeholders for you to do the exercises, compile and run them; and compare to the provided solutions
- LaYumba.Functional: a functional library that we develop throughout the book
- LaYumba.Functional.Tests: also illustrative of topics explained in the book, and useful to better understand the constructs in the library
Note: you are welcome to use LaYumba.Functional
, but the main intent of this library
is pedagogical. For a more fully-fledged functional library, consider language-ext
- install .NET Core
- run
dotnet restore
Command line:
$ cd src/LaYumba.Functional.Tests ## or other project folder
$ dotnet test
In Visual Studio, Test > Run > All Tests
-
edit the code in
src/Exercises
as needed -
edit
src/Exercises/Program.cs
to start the class you want -
run it with:
$ cd src/Exercises $ dotnet run
-
run your tests:
$ cd src/Exercises $ dotnet test