functional programming examples