Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/arnauddri/algorithms
/ Peek
Method
Peek
data-structures/stack/stack.go:52–57 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
50
}
51
52
func
(s *Stack) Peek()
interface
{} {
53
s.lock.Lock()
54
defer
s.lock.Unlock()
55
56
return
s.stack[0]
57
}
Callers
1
TestNew
Function · 0.45
Calls
no outgoing calls
Tested by
1
TestNew
Function · 0.36