MCPcopy Create free account
hub / github.com/SolarLune/masterplan / ForEachInTail

Method ForEachInTail

stack.go:174–189  ·  view source on GitHub ↗
(f func(c *Card) bool)

Source from the content-addressed store, hash-verified

172var tested = map[*Card]bool{}
173
174func (s *Stack) ForEachInTail(f func(c *Card) bool) {
175
176 below := s.Below
177 clear(tested)
178 for below != nil {
179 if !f(below) {
180 return
181 }
182 if _, exists := tested[below]; exists {
183 break
184 }
185 tested[below] = true
186 below = below.Stack.Below
187 }
188
189}
190
191func (stack *Stack) Children() []*Card {
192 children := []*Card{}

Callers 2

ReceiveMessageMethod · 0.80
ClockInPhaseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected