Playing with some functional programming