functional programming view 2