Below you will find pages that utilize the taxonomy term “functional-programming”
Posts
Fold and Reduce in LINQ
In functional programming languages, there are several difference betwee them. I was quite interested in functional programming, even I spent some time to learn haskel and scala. I knew what I can use Select for map, not sure about folder and reduce
FeatureFoldReduceInitial ValueRequires an initial value.Does not require an initial value.Function Signature(A, B) => A(A, A) => AApplicabilityCan be used on empty collections.Requires a non-empty collection.VariantsfoldLeft and foldRightreduceLeft and reduceRightStarting PointfoldLeft starts from the left.