Functional programming example - currying