Category Theory via C# (19) More Monad: State< , > Monad
2018-12-20
represents a abstract machine with one state or a number of state. C# use state machine a lot. For example:
1453 words
|
7 minutes
Category Theory via C# (18) More Monad: IO<> Monad
2018-12-19
As mentioned in a previous part, in purely functional programming, functions cannot have side effects. For example, when defining LINQ queries, laziness and purity are expected. So, how should the imp
1539 words
|
8 minutes
Category Theory via C# (17) Monad-like Tuple<>, Task<>, IQueryable<> And IQbservable<>
2018-12-18
Theoretically, Tuple<> should be counted as the Id<> monad. However, it is lack of laziness. In the context of C# and LINQ, it is only monad-like.
1410 words
|
7 minutes
Category Theory via C# (16) More Monads: Lazy<>, Func<>, Nullable<>, ParallelQuery<> And IObservale<>
2018-12-17
Again, Lazy<> is the simplest monad, it is just the lazy version of Tuple<>, and should be considered as the Id<> monad. This is the implementation of its SelectMany:
1571 words
|
8 minutes
Category Theory via C# (15) IEnumerable<> Monad And LINQ: SelectMany For All
2018-12-16
Previous part introduced SelectMany for monad IEnumerable<>. Actually SelectMany is more than meets the eye, and can be used to implement other LINQ queries.
2772 words
|
14 minutes
Category Theory via C# (14) Monad And IEnumerable<>
2018-12-15
A previous part showed endofunctor category is a monoid (the entire category itself). An endofunctor In the endofunctor category can be monoid too. This kind of endofunctor is called monad. Formally,
1808 words
|
9 minutes
Category Theory via C# (13) Monoidal Functor-like Tuple<> And Task<>
2018-12-14
Theoretically, Tuple<> should be counted as the Id<> monoidal functor. However, as previously mentioned, it is lack of laziness.
791 words
|
4 minutes
Category Theory via C# (12) More Monoidal Functors: Lazy<>, Func<> And Nullable<>
2018-12-13
Lazy<> should be the simplest monoid functor - it is just the lazy version of Tuple<>. And in these posts it will be considered as the Id<> monoidal functor.
916 words
|
5 minutes
Category Theory via C# (11) Monoidal Functor And IEnumerable<>
2018-12-12
Given monoidal categories (C, ⊗, IC) and (D, ⊛, ID), a (or lax monoidal functors) is a functor F: C → D equipped with:
1982 words
|
10 minutes
Category Theory via C# (10) Monoidal Category
2018-12-11
A previous part demonstrated endofunctor category is monoidal. Now with the help of bifunctor, the general abstract can be defined.
639 words
|
3 minutes