C# Functional Programming In-Depth (14) Asynchronous Function https://weblogs.asp.net:443/dixin/functional-csharp-asynchronous-function [LINQ via C# series][C# functional programming in-depth series]Asynchronous function can improve the responsiveness and scalability of the application and service. C# 5.0 introduces asynchronous function to greatly simplify the async programming model.Task, Task<TResult> and asynchronyMon, 04 Mar 2024 12:58:00 GMThttps://weblogs.asp.net:443/dixin/functional-csharp-asynchronous-function.NETC#C# 5.0LINQLINQ via C#C# FeaturesFunctional ProgrammingFunctional C#Functional Programming and LINQ via C# https://weblogs.asp.net:443/dixin/fp-csharp AcclaimContents at a GlanceTable of ContentsThis is a book on functional programming and LINQ programming via C# language. It discusses:Functional programming via C# in-depthUse functional LINQ to work with local data and cloud dataThe underlying mathematics theories of functionaSat, 02 Mar 2024 03:16:00 GMThttps://weblogs.asp.net:443/dixin/fp-csharp.NETC#Functional ProgrammingLINQLINQ via C#.NET Core.NET StandardC# 8.0Category Theory via C# (8) Advanced LINQ to Monads https://weblogs.asp.net:443/dixin/category-theory-via-csharp-8-more-linq-to-monads [FP & LINQ via C# series][Category Theory via C# series]Monad is a powerful structure, with the LINQ support in C# language, monad enables chaining operations to build fluent workflow, which can be pure. With these features, monad can be used to manage I/O, state changes, exception handling,Sun, 31 Dec 2023 13:13:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-8-more-linq-to-monadsC#.NETFunctional ProgrammingLINQCategory TheoryLINQ via C#MonadsCategory Theory via C# (7) Monad and LINQ to Monads https://weblogs.asp.net:443/dixin/category-theory-via-csharp-7-monad-and-linq-to-monads [FP & LINQ via C# series][Category Theory via C# series]MonadAs fore mentioned endofunctor category can be monoidal (the entire category. Actually, an endofunctor In the endofunctor category can be monoidal too. This kind of endofunctor is called monad. Monad is another important algebraicTue, 26 Dec 2023 13:13:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-7-monad-and-linq-to-monadsC#.NETFunctional ProgrammingLINQCategory TheoryLINQ via C#MonadsCategory Theory via C# (6) Monoidal Functor and Applicative Functor https://weblogs.asp.net:443/dixin/category-theory-via-csharp-6-monoidal-functor-and-applicative-functor [FP & LINQ via C# series][Category Theory via C# series]Monoidal functorGiven monoidal categories (C, ⊗, IC) and (D, ⊛, ID), a strong lax monoidal functor is a functor F: C → D equipped with:Monoid binary multiplication operation, which is a natural transformation φ: F(Mon, 25 Dec 2023 13:12:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-6-monoidal-functor-and-applicative-functorC#.NETFunctional ProgrammingLINQCategory TheoryLINQ via C#Applicative FunctorsMonadal FunctorsCategory Theory via C# (5) Bifunctor https://weblogs.asp.net:443/dixin/category-theory-via-csharp-5-bifunctor [FP & LINQ via C# series][Category Theory via C# series]BifunctorA functor is the mapping from 1 object to another object, with a “Select” ability to map 1 morphism to another morphism. A bifunctor (binary functor), as the name implies, is the mapping from 2 objects and from 2 Fri, 15 Dec 2023 13:11:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-5-bifunctorC#.NETFunctional ProgrammingLINQCategory TheoryCategoriesLINQ via C#BifunctorsMonadal CategoriesCategory Theory via C# (4) Natural Transformation https://weblogs.asp.net:443/dixin/category-theory-via-csharp-4-natural-transformation [FP & LINQ via C# series][Category Theory via C# series]Natural transformation and naturalityIf F: C → D and G: C → D are both functors from categories C to category D, the mapping from F to G is called natural transformation and denoted α: F ⇒ G. α: F ⇒ G iThu, 14 Dec 2023 13:10:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-4-natural-transformationLINQ via C#C#.NETFunctional ProgrammingLINQCategory TheoryFunctorsNatural TransformationCategoriesCategory Theory via C# (3) Functor and LINQ to Functors https://weblogs.asp.net:443/dixin/category-theory-via-csharp-3-functor-and-linq-to-functors [FP & LINQ via C# series][Category Theory via C# series]Functor and functor lawsIn category theory, functor is a mapping from category to category. Giving category C and D, functor F from category C to D is a structure-preserving morphism from C to D, denoted F: C → D:F maps objWed, 13 Dec 2023 13:10:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-3-functor-and-linq-to-functorsLINQ via C#C#.NETFunctional ProgrammingLINQCategory TheoryFunctorsCategory Theory via C# (2) Monoid https://weblogs.asp.net:443/dixin/category-theory-via-csharp-2-monoid [FP & LINQ via C# series][Category Theory via C# series]Monoid and monoid lawsMonoid is an important algebraic structure in category theory. A monoid M is a set M equipped with a binary operation ⊙ and a special element I, denoted 3-tuple (M, ⊙, I), whereM is a set of elements⊙ is a Tue, 12 Dec 2023 13:09:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-2-monoidC#.NETFunctional ProgrammingLINQCategory TheoryCategoriesLINQ via C#Monoid`Category Theory via C# (1) Fundamentals https://weblogs.asp.net:443/dixin/category-theory-via-csharp-1-fundamentals [FP & LINQ via C# series][Category Theory via C# series]Category theory is a theoretical framework to describe abstract structures and relations in mathematics, first introduced by Samuel Eilenberg and Saunders Mac Lane in 1940s. It examines mathematical concepts and properties in an abstracFri, 01 Dec 2023 13:08:00 GMThttps://weblogs.asp.net:443/dixin/category-theory-via-csharp-1-fundamentalsC#.NETFunctional ProgrammingLINQCategory TheoryCategoriesLINQ via C#Lambda Calculus via C# (7) Fixed Point Combinator and Recursion https://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-7-fixed-point-combinator-and-recursion [FP & LINQ via C# series][Lambda Calculus via C# series]p is the fixed point (aka invariant point) of function f if and only if: p≡ f pTake function Math.Sqrt as example, it has 2 fix point, 0 and 1, so that 0 ≡ Math.Sqrt(0) and 1 ≡ Math.Sqrt(1).The above fixed pThu, 23 Nov 2023 13:19:00 GMThttps://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-7-fixed-point-combinator-and-recursionLINQ via C#C#.NETLambda CalculusFunctional ProgrammingCombinatorsCombinatory LogicFixed Point CombinatorY CombinatorLambda Calculus via C# (6) Combinatory Logic https://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-6-combinatory-logic [FP & LINQ via C# series][Lambda Calculus via C# series]In lambda calculus, the primitive is function, which can have free variables and bound variables. Combinatory logic was introduced by Moses Schönfinkel and Haskell Curry in 1920s. It is equivalent variant lambda calculus, with combSun, 19 Nov 2023 13:06:00 GMThttps://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-6-combinatory-logicLINQ via C#C#.NETLambda CalculusFunctional ProgrammingCombinatorsCombinatory LogicSKIIotaLambda Calculus via C# (5) List https://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-5-list [FP & LINQ via C# series][Lambda Calculus via C# series]In lambda calculus and Church encoding, there are various ways to represent a list with anonymous functions.Tuple as list nodeWith Church pair, it is easy to model Church list as a linked list, where each list node is a a Church paiMon, 13 Nov 2023 13:06:00 GMThttps://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-5-listLINQ via C#C#.NETLambda CalculusFunctional ProgrammingChurch EncodingChurch ListsLambda Calculus via C# (4) Tuple and Signed Numeral https://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-4-tuple-and-signed-numeral [FP & LINQ via C# series][Lambda Calculus via C# series]Besides modeling values like Boolean and numeral, anonymous function can also model data structures. In Church encoding, Church pair is an approach to use functions to represent a tuple of 2 items.Church pair (2-tuple)A tuple can beFri, 10 Nov 2023 13:05:00 GMThttps://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-4-tuple-and-signed-numeralLINQ via C#C#.NETLambda CalculusFunctional ProgrammingChurch EncodingChurch PairsLambda Calculus via C# (3) Numeral, Arithmetic and Predicate https://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-3-numeral-arithmetic-and-predicate [FP & LINQ via C# series][Lambda Calculus via C# series]Anonymous functions can also model numerals and their arithmetic. In Church encoding, a natural number n is represented by a function that calls a given function for n times. This representation is called Church Numeral.Church numeralTue, 07 Nov 2023 13:05:00 GMThttps://weblogs.asp.net:443/dixin/lambda-calculus-via-csharp-3-numeral-arithmetic-and-predicateLINQ via C#C#.NETLambda CalculusFunctional ProgrammingChurch EncodingChurch Numeral