unroll.function function

Convert a function with matrix arguments to a function with vector arguments.