Applying functions conditionally, binding rows with results and some extensions to vectors.