]> git.lizzy.rs Git - micro.git/blobdiff - src/stack.go
Add explanation for setting the colorscheme to readme
[micro.git] / src / stack.go
index 7b1dd6686389eb5edf96caf87405daac6a77536a..c7c8fd787fc52fc488f15d3f667b65b6aba3c0ae 100644 (file)
@@ -34,10 +34,10 @@ func (s *Stack) Pop() (value interface{}) {
        return nil
 }
 
-// Peek lets you see and edit the top value of the stack without popping it
-func (s *Stack) Peek() *interface{} {
+// Peek returns the top element of the stack without removing it
+func (s *Stack) Peek() interface{} {
        if s.size > 0 {
-               return &s.top.value
+               return s.top.value
        }
        return nil
 }