Experiments with functional programming