In this tutorial we're going to build a set of parser combinators.
What is a parser combinator?
We'll answer the above question in 2 steps
- what is a parser?
- and.. what is a parser combinator?
So first question: What is parser?
This is the final part of a series about Algebraic Effects and Handlers.
So we've come to the core topic. The reality is that we've already covered most of it in the previous parts. Especially, in the third part, where we saw delimited continuations at work.
This is the first post of a series about Algebraic Effects and Handlers.
There are 2 ways to approach this topic:
Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra. On the other hand, the operational approach is accessible to a much wider audience of programmers even if it doesn't provide the full picture.
In Redux, reducer composition with
combineReducers offers a powerful way to handle
complex update logic of an application. A reducer can encapsulate all the ways a part
of the state is mutated because it can react to multiple types of actions.
But in some cases there is also a need for another type of factoring: often the update logic is simple (for example setting a single value), and the there are many places in the state shape where the update logic is the same.
This is the second part of a series about Algebraic Effects and Handlers.
Note: initially I planned a 3-part series, but since the current post on undelimited continuations ended up taking
This is the third part of a series about Algebraic Effects and Handlers.
In the preceding parts, we introduced the notions of continuations and control transfer. We saw how to capture the current