The use of functors in recursion scheme catamorphisms and anamorphisms