3 ms·
> Many `Graph` instances are `Monad`s. For example, `Basic` is a `Monad` (and many other things too). But on the other hand `Relation` is not a `Monad`, because
by JadeNB 10y ago
> Many `Graph` instances are `Monad`s. For example, `Basic` is a `Monad` (and many other things too). But on the other hand `Relation` is not a `Monad`, because it imposes the `Ord` constraint on the underlying type (and Haskell monads are not allowed that).
Indeed, I did say that it was a monad and not a `Monad`; math doesn't suffer from these implementation constraints. :-)
> Thanks, indeed "clique" may be not the best name... I decided to use it, because I would like to reserve "complete graph" to mean something like `clique [1..]` i.e. the complete graph on the whole universe. If we look from this perspective then something like `clique [1..10]` may look like a clique within some bigger graph. Anyway, I admit this may be confusing.
Oh, that makes more sense. Maybe it's worth even making just a throwaway remark to that effect?
- sn0wleopard 10y ago> Indeed, I did say that it was a monad and not a `Monad`; math doesn't suffer from these implementation constraints. :-) Ah, I see :-) Indeed, from the mathematical standpoint we can both inject a vertex into the graph type with `vertex`, and flatten a graph whose nodes are graphs (the monad `join`, not to be confused with graph `join` operation that I'm using). I haven't given this much thought before, thanks for noticing this. > Oh, that makes more sense. Maybe it's worth even making just a throwaway remark to that effect? I've added the following remark: "we will call such cliques covering the whole universe complete graphs". Hopefully this helps to clarify the naming convention.