learning functional programming complexity