Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module TestStdStack2
- import StdStack2, StdEnv
- listStack :: Stack2 a
- listStack = { stack = []
- , push = \a x = {x & stack = [a : x.stack]}
- , pop = \ x = {x & stack = tl x.stack}
- , top = \ x = hd x.stack
- , elements = \ x = x.stack
- }
- //charStack :: Stack2 Char
- //charStack = { stack = "", ... }
- Start = 8
Add Comment
Please, Sign In to add comment