Created classes to perform functional map and fold