-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Functional Programming with C#
By :

As Julia finished explaining the currying example, Steve nodded thoughtfully.
Steve: I think I’m starting to get it. But how do we actually implement currying in our code?
Julia: Great question! Let’s break it down step-by-step...
A process for implementing currying is actually quite easy:
Select a function that takes multiple parameters. This function is a candidate for currying if you often find yourself using only some of the parameters at a time or if the parameters are naturally grouped in stages.
Transform the multi-parameter function into a sequence of nested, single-parameter functions. Each function returns another function that expects the next parameter in the sequence.
We can utilize Func
delegates to implement curried functions. Each Func returns another Func until all parameters are accounted for, culminating in the...
Change the font size
Change margin width
Change background colour