Click here to Skip to main content
15,614,665 members
Articles / Programming Languages / C# 7.0

Tagged as

Stats

35.9K views
372 downloads
49 bookmarked

IResult - A Robust Option Type for C#

Rate me:
Please Sign up or sign in to vote.
5.00/5 (46 votes)
9 Jun 2017CPOL7 min read
An attempt to introduce some Functional Programming concepts into an OOP domain
In this article, I discuss IResult, which I created based on the concept of an Option (or Maybe) type from functional programming languages. IResult utilizes some of these new features of C# 7.0 to emulate an the Option type from F#, including helper functions like Bind, Map and Fold. I look at reading input, parsing input, IResult extension methods, and how to put it all together.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
I started my dev career writing in a custom port of PL/1 for 4 years.

Now I'm an enterprise C# developer in Portland, OR.

I think I'll stick with C#.

Comments and Discussions