optimize IList#takeRight, takeRightWhile, collect