join an array of functions