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.
()
| 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. |
| 157 | func (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 | |
| 172 | var tested = map[*Card]bool{} |
| 173 |
no outgoing calls
no test coverage detected