Implemented prefixOf as an extensions method and modified spec for Exercise 6 appropriately