Peek Peek value, not remove element.
()
| 36 | |
| 37 | // Peek Peek value, not remove element. |
| 38 | func (s *Stack) Peek() interface{} { |
| 39 | index := len(*s) - 1 |
| 40 | element := (*s)[index] // Index into the slice and obtain the element. |
| 41 | return element |
| 42 | } |
| 43 | |
| 44 | type Frame struct { |
| 45 | scope symbol.Scope |
no outgoing calls