Wrote simple event to subgraph function.

Updated related code to align.
This commit is contained in:
Jay
2026-03-03 11:01:37 -05:00
parent a1be3faf14
commit e734fc77ed
7 changed files with 319 additions and 42 deletions

16
util.go
View File

@@ -29,6 +29,22 @@ func (s Set[T]) Contains(item T) bool {
return exists
}
func (s Set[T]) Equal(other Set[T]) bool {
if len(s.inner) != len(other.inner) {
return false
}
for item := range s.inner {
if !other.Contains(item) {
return false
}
}
return true
}
func (s Set[T]) Length() int {
return len(s.inner)
}
func (s Set[T]) ToArray() []T {
array := []T{}
for i := range s.inner {