summaryrefslogtreecommitdiffstats
path: root/content/zettel/3c3k1.md
blob: 358910de4751926e97f31419fb50d34b2fb2d4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+++
title = "Theory Around `sem_pred_expr`"
date = "2022-11-16"
author = "Yann Herklotz"
tags = []
categories = []
backlinks = ["3c3k"]
forwardlinks = []
zettelid = "3c3k1"
+++

The function `sem_pred_expr` has the same type signature as a `foldMap`
function, maybe also the same signature as `foldMapM`, where the monad
is the `Reader` monad. The only difference seems to be with how the
elements are combined. Instead of being combined using the monoid, they
are combined using the evaluation of the predicates, because this is
only implemented for predicated objects.

In addition to that, I feel like there should be a similarity between
sending the identity semantics into the predicated semantics and the
general **Free Applicative**. This is because we are essentially
extracting the structure of the object that is inside of the predicates.