I'm learning functional programming in scala