Peek returns top of a stack without deletion
()
| 39 | |
| 40 | // Peek returns top of a stack without deletion |
| 41 | func (stack *Stack) Peek() interface{} { |
| 42 | if stack.depth > 0 { |
| 43 | return stack.sp.item |
| 44 | } |
| 45 | |
| 46 | return nil |
| 47 | } |
nothing calls this directly
no outgoing calls
no test coverage detected