Functional Data Structures
- Stack
Logical View
%0
cluster_variables
variables
cluster_memory
memory
c1
1
c2
2
c2->c1
c3
3
c3->c2
c6
5
c6->c3
b1
1
b2
2
b2->b1
b3
3
b3->b2
b4
4
b4->b3
b5
5
b5->b4
a1
1
a2
2
a2->a1
a3
3
a3->a2
c
c
c->c6
b
b
b->b5
a
a
a->a3
Operations
a = empty
a = push 1 a
a = push 2 a
a = push 3 a
b = push 4 a
b = push 5 b
c = push 5 a
Add an operation
E.g. myVar = empty
Load a preset
Simple
Shared View
%0
cluster_variables
variables
cluster_memory
memory
6
5
3
3
6->3
5
5
4
4
5->4
4->3
2
2
3->2
1
1
2->1
c
c
c->6
b
b
b->5
a
a
a->3