stack

package
v0.0.0-...-5f0e84e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package stack implements a heterogeneous stack

Example

Example that excercises the stack causing jig to generate the Stack type and all its methods we want to export into the stack.go file.

var s Stack
s.Push(42)
s.Pop()
s.Top()
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack []interface{}

func (*Stack) Pop

func (s *Stack) Pop() (interface{}, bool)

func (*Stack) Push

func (s *Stack) Push(v interface{})

func (*Stack) Top

func (s *Stack) Top() (interface{}, bool)

Directories

Path Synopsis
Package stack implements a generic stack
Package stack implements a generic stack
Package test provides tests for the generic stack
Package test provides tests for the generic stack
Pop
Pop test
Pop test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL