Last time we tried to imagine how we could change usual event sourcing definition$ to get a monoidal approach. Here are some examples to make it work in real life. Monoids
Many concepts from Category Theory appear in functional programming languages, for example the functor, monoid, monad, and natural transformation. Although each of these concepts carries with it a distinct structure, each provides us with a way to unite the similarities in a piece of code, or even across and entire project, while still maintaining the crucial differences. Category Theory gives us the means to abstract over concepts such as types, type constructors, and operations, to name a few. In other words, Category Theory is the programmer's library of abstractions.
Functional languages, by their very nature, often direct the programmer to think abstractly in terms of categories. From a meta perspective, learning Category Theory helps us to become aware of the types of thoughts we have when we program in a functional language, versus say an imperative one. Programming in a different language inherently changes how we approach a problem, given the tools available in that language. By becoming aware of those differences in approach, we can make more informed choices in our programs.
In this talk we will discuss via example how we can understand various functional programs using a categorical approach. Additionally, we will discuss how we can use Category Theory to write cleaner and more maintainable code.
Alissa Pajer began her functional programming career as a Scala engineer at Precog. She worked there for two years, until Precog was acquired by RichRelevance, her current employer. Before her coding days, she studied pure mathematics, earning a Bachelors from Carleton College and a Masters from the University of Colorado. She currently lives in Munich, Germany, where she spends her non-computer time hiking, running, swimming, and cycling.
Ensuring an instance of the Monoid type-class actually satisfies the "monoid laws" (i.e. associativity, left identity and right identity) using Idris, a depe...
In F#, class constructors can be declared in several different ways. To declare a non-static class, one usually defines a primary constructor, plus zero or more additional constructors. To declare a static class, one usually defines a module.
This entry is part of "The Basic Syntax of F#" series: The basic syntax of F# - keywords and constructs The basic syntax of F# - classes, interfaces, and members The basic syntax of F# - ...
To get content containing either thought or leadership enter:
To get content containing both thought and leadership enter:
To get content containing the expression thought leadership enter:
You can enter several keywords and you can refine them whenever you want. Our suggestion engine uses more signals but entering a few keywords here will rapidly give you great content to curate.