Comments in curried lambda expression
Just a quick question. Do you think the comments I used here are correct? If needed I'll provide the whole code:
7 Replies
Looks correct, but took me a while to get my head around it
understandable, that's the struggle with code that's put into one line as much as possible
That might well benefit from some custom delegates, with named parameters. Otherwise you're having to work out what each unnamed
double
actually meansI see. Thanks
And
PriceCalculator
doesn't really capture the fact that you give it a discount, and it gives you back a function which turns a price into a final price (with discount and tax)yeah I know, but I was asking because this was part of a classroom assignment. It worked but I didn't know why it worked, so I was asking to be sure
👍