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

Method Tail

stack.go:157–170  ·  view source on GitHub ↗

Tail returns the rest of the Stack from this Card down (excluding this Card). The slice is sorted vertically, starting with the top of the stack.

()

Source from the content-addressed store, hash-verified

155
156// Tail returns the rest of the Stack from this Card down (excluding this Card). The slice is sorted vertically, starting with the top of the stack.
157func (stack *Stack) Tail() []*Card {
158 rest := []*Card{}
159 below := stack.Below
160 tested := map[*Card]bool{}
161 for below != nil {
162 if _, exists := tested[below]; exists {
163 break
164 }
165 rest = append(rest, below)
166 tested[below] = true
167 below = below.Stack.Below
168 }
169 return rest
170}
171
172var tested = map[*Card]bool{}
173

Callers 6

ChildrenMethod · 0.95
BottomMethod · 0.95
AllMethod · 0.95
UpdateMethod · 0.80
SyncPropertyMethod · 0.80
placeCardInStackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected