useful function definition
Merge branch 'master' of github.com:dominikwille/comp
vectorized f