All Questions
4 questions
12
votes
4
answers
3k
views
Why usage of assignment operator or loops discouraged in functional programming?
If my function meets the two requirements listed below, I believe that the function Sum returns the summation of the items in a list, where item evaluates as true for a given condition. Doesn't this ...
1
vote
2
answers
251
views
Functional programming: does using a generic make a function impure?
public static Func<string, Task<T>> MyMethod<T>(
UserCredentials credentials,
Func<string, string, string, Task<T>> func
) =>
async (value) ...
28
votes
5
answers
4k
views
Does catching/throwing exceptions render an otherwise pure method impure?
The following code examples provide context to my question.
The Room class is initialized with a delegate. In the first implementation of the Room class, there are no guards against delegates that ...
4
votes
1
answer
234
views
Is anything gained by making dependencies explicit via function argument lists when implementing pure methods?
This question is followup to this question.
Is there any benefit in avoiding the 'this' operator when implementing pure methods? That is, are there any advantages to making all dependencies explicit ...