added more work for IndexedSeq's foldRight