<<<>>>
1 / 23
This slideshow will demonstrate the execution of the MergeLists method.
- List FilterList(int num)
- {
- return ( = (% num 2) 0 )
- }
Filter method (checks if a number is even) (below)
- List FilterList(List list, function foo)
- {
- if( isNull(list) )
- return []
- else if( foo(car(list)) )
- return cons(car(list),FilterList(list,foo) )
- else
- return FilterList(list,foo)
- }
MergeLists Public Method (below)
- 20
- 31
- 12
- 63
List
Call Stack
Accumulated
- 30
- 11
- 62
List
- 20
Call Stack
Accumulated
- 10
- 61
List
- 20
Call Stack
Accumulated
- 60
List
- 20
Call Stack
Accumulated
List
- 20
- 61
Call Stack
Accumulated
List
- 20
Call Stack
- 60
Accumulated
List
Call Stack
- 20
- 61
Accumulated