ex5.16 - scanRight - 2 implementations. the unfold implementation is probably more efficient?