summaryrefslogtreecommitdiff
path: root/files/practicum/StdStack2.icl
blob: 3d4e80c7b43deb486061ba61e08c03433e82fcae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
implementation module StdStack2

import StdEnv

::	Stack2 elem = E.impl:	{ stack		:: impl
							, push		:: elem impl -> impl
							, pop		::      impl -> impl
							, top		::      impl ->  elem
							, elements	::      impl -> [elem]
							}

push :: elem (Stack2 elem) -> Stack2 elem
push ...

pop :: (Stack2 elem) -> Stack2 elem
pop ...

top :: (Stack2 elem) -> elem
top ...

elements :: (Stack2 elem) -> [elem]
elements ...