Experiments with Javascript function composition