I hereby claim:
- I am spareshade on github.
- I am spareshade (https://keybase.io/spareshade) on keybase.
- I have a public key ASAjH0r1IZqiO2FZiIsR3Yy_PW1VEQEq9qGS5jmPaUR71go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Package main is the entry point for the Bleyk App V1. | |
package main | |
import ( | |
// Import necessary packages | |
"context" | |
"flag" | |
"fmt" | |
"log" |
// Package caption provides the implementation of the CaptionAggregate, an aggregate representing the state | |
// of captions for artworks within the artwork domain. This package handles the registration, modification, | |
// and tracking of caption details for both unique and editioned artworks. The CaptionAggregate ensures data | |
// integrity by applying events in a specific order and emitting new events for changes in caption details. | |
// It also includes functions for transitioning the aggregate state, tracking changes, and handling various | |
// commands related to caption management. | |
// | |
// The CaptionAggregate is designed to work within a larger context of an artwork service, where it interacts | |
// with other components to maintain a consistent and reliable state of artwork captions. The code includes | |
// comments and documentation to guide developers through the functionality and usage of the CaptionAggregate. |
type Edge = [number, number]; | |
function allLoopsBack(node: number, edges: Edge[]): number[][] { | |
const loops: number[][] = []; | |
const visited: boolean[] = new Array(edges.length).fill(false); | |
function findPaths(inNode: number, path: number[]): void { | |
const inNodeIdx = edges.findIndex((e) => e[0] === inNode); | |
// must exist as an `in` node |