Safe HaskellSafe

Stack

Description

A Module for Stacks

Synopsis

Documentation

type Stack a = [a] Source #

Stacks are implemented as lists.

empty :: Stack a Source #

The empty stack.

push :: a -> Stack a -> Stack a Source #

Pushing an element on top of a stack.

pop :: Stack a -> (a, Stack a) Source #

Popping the top element of a stack.