C# Functional Programming In-Depth (12) Immutability, Anonymous Type, and Tuple
2018-06-12
Immutability is an important aspect of functional paradigm. As fore mentioned, imperative/object-oriented programming is usually stateful, and functional programming encourages immutability without st
4175 words
|
21 minutes
C# Functional Programming In-Depth (11) Covariance and Contravariance
2018-06-11
In ), variance means the capability to substitute a type with a more derived type or les
3297 words
|
16 minutes
C# Functional Programming In-Depth (10) Query Expression
2018-06-10
C# 3.0 introduces query expression, a SQL-like query syntactic sugar for query methods composition.
1254 words
|
6 minutes
C# Functional Programming In-Depth (9) Function Composition and Chaining
2018-06-09
In object-oriented programming, objects can be composed to build more complex object. Similarly, in functional programming. functions can be composed to build more complex function.
1561 words
|
8 minutes
C# Functional Programming In-Depth (8) Higher-order Function, Currying and First Class Function
2018-06-08
is a function accepting one or more function parameters as input, or returning a function as output. The other functions are
3145 words
|
16 minutes
C# Functional Programming In-Depth (7) Expression Tree: Function as Data
2018-06-07
C# lambda expression is a powerful syntactic sugar. Besides representing anonymous function, the same syntax can also represent expression tree.
3013 words
|
15 minutes
C# Functional Programming In-Depth (6) Anonymous Function and Lambda Expression
2018-06-06
Besides named function represented by method members, C# also supports anonymous functions, represented by anonymous method or lambda expression with no name at design time. This part discussed lambda
1491 words
|
7 minutes
C# functional programming in-depth (5) Delegate: Function type, instance and group
2018-06-05
In C#, functions are represented by methods of types, and other function members of types. In C#, just like just objects have types, methods/functions have types too, which are represented by delegate
3508 words
|
18 minutes
C# functional programming in-depth (4) Function input and output
2018-06-04
In C#, by default, arguments are passed to parameters by value. In the following example, the PassByValue function has a Uri parameter and a int type parameter. Uri is class so it is reference type, a
2077 words
|
10 minutes
C# functional programming in-depth (3) Local Function and Closure
2018-06-03
C# 7.0 introduces local function, which allows defining and calling a named, inline function inside a function member’s body. Unlike a local variable, which has to be used after being defined, a local
1915 words
|
10 minutes