Functional programming demo