my learning of functional programming