Ergo.Stack.peek
You're seeing just the function
peek
, go back to Ergo.Stack module for more information.
Link to this function
peek(list)
Get the top element of the stack without modifying the stack
Examples
iex> alias Ergo.Stack
iex> s = Stack.new() |> Stack.push(1) |> Stack.push(2)
iex> assert 2 = Stack.peek(s)