This is the tie-in Github respository for my book "Functional Programming with C#", published by O'Reilly Media, September 2023.
This is a living repository, and hopefully will continue to be updated long after the book has been in print. It's possible that content here might eventually find its way into the 2nd edition - if there is one (that's not in my hands to decide!).
Please feel free to contribute if you can think of possible improvements. I'll ensure that you get credit here, and if any of your work ends up in a future edition of my book, I'll also ensure you get credited there too.
The next few sections describe the types of code sample that are intended to be stored here.
A full implementation of all of the functional code concepts I included in the book. These are licenced under a Creative Commons 3.0 licence, so it's free of cost for you to use in any and all projects, professional or personal, but please don't attempt to pass it off as your own work.
If you make any improvements, please do feel free to share the wealth and improve what's available here.
I'll continue to update this as newer versions of C# are available as well, so this is the section most likely to be more recent than the book itself.
As of the time of publication (September 2023) this sample game wasn't entirely finished, but the source that's done is available here. I ran out of time while the book was being written.
I'm intending to continue working on it after publication date has passed and hopefully it'll be finished before too long.
There's a good chance I've both expanded the code, and applied bug fixes to it since the original version in the book, so don't worry too much if the code samples don't match exactly. This version here is the definitive one.
I have other games I'm interested in writing in this style too. All being well, I'm intending to add these here at some point.
Every year I take part in the Advent of Code event. I'll put functional-style C# solutions to these here each year, which you can use as potential sources for inspiration for your own functional code.
I may add other code samples from other sources whenever I find anything worth coding.