<<<>>>
1 / 28
This slideshow will demonstrate the execution of the ListSize method.
- int ListSize(List list)
- {
- if( isNull(list) )
- return 0
- else
- return ListSizeHelper(list, 0 )
- }
ListSize Public Method (below)
- int ListSizeHelper(List list, int count)
- {
- if( isNull(list) )
- return count
- else
- return ListSizeHelper(cdr(list), add1(count) )
- }
ListSize Private Helper Method (below)
- 20
- 61
- 102
- 73
List
Count : 0
- 60
- 101
- 72
List
- 100
- 71
List
- 70
List
List