Made Foundation collection classes implement Functor