JSAV FilterList FilterList Slideshow

<<<>>>
1 / 23

This slideshow will demonstrate the execution of the MergeLists method.

  1. List FilterList(int num)
  2. {
  3. return ( = (% num 2) 0 )
  4. }
Filter method (checks if a number is even) (below)
  1. List FilterList(List list, function foo)
  2. {
  3. if( isNull(list) )
  4. return []
  5. else if( foo(car(list)) )
  6. return cons(car(list),FilterList(list,foo) )
  7. else
  8. return FilterList(list,foo)
  9. }
MergeLists Public Method (below)
  1. 20
  2. 31
  3. 12
  4. 63
List
    Call Stack
      Accumulated