...
- Write a visitor called Length to compute the length of an IntList. #*
- Write a non-tail recursive version (using direct recursion).
- Write a tail-recursive version using a helper visitor (in place of a helper method).
- 2 Write a visitor called
ProdNums
that returns the product of the number in the list, using a tail recursive helper visitor. 3 - Write a visitor called
Reverse
that reverses the list using a tail-recursive helper visitor. - 4 Write a visitor called
ListString
that uses as tail recursive visitor as done in the method listString. - 5 Write a visitor called
MakePalindrome
that returns a list consisting of the input list and its mirror around the last element, using a (non tail-recursive) helper with an accumulator. For example,(1, 2, 3).accept(MakePalindrome.ONLY)
returns the list(1, 2, 3, 2, 1)
.
...
Access Permissions: (Please don't edit)
...