MCPcopy Create free account
hub / github.com/Effect-TS/effect / invalidateCycleFlagOnAddition

Function invalidateCycleFlagOnAddition

packages/effect/src/Graph.ts:2229–2236  ·  view source on GitHub ↗
(
  mutable: GraphImpl<N, E, T>
)

Source from the content-addressed store, hash-verified

2227
2228/** @internal */
2229const invalidateCycleFlagOnAddition = <N, E, T extends Kind = "directed">(
2230 mutable: GraphImpl<N, E, T>
2231): void => {
2232 // Only invalidate if the graph was acyclic (adding edges cannot remove cycles from cyclic graphs).
2233 if (mutable.acyclic._tag === "Some" && mutable.acyclic.value === true) {
2234 mutable.acyclic = Option.none()
2235 }
2236}
2237
2238// =============================================================================
2239// Edge Operations

Callers 1

addEdgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected