Write a method 'filter' that takes an array a of integers and a delegate f that maps an integer to a bool. The method should return an array containing only the integers i in a for which f(i) is true.
Generalize the previous method so that it will work with any kind of array.
Repeat the previous exercise, using a linked list of any type T and a delegate that maps type T to a bool.
Repeat the previous exercise, modifying the linked list in place rather than returning a new linked list.