function which takes functions as arguments



Sorry, there was a typo in my definition; it should be:

     jacobian_matrix(exprs,vars) :=
        genmatrix(lambda([i,j],diff(exprs[i],vars[j])),length(exprs),length(vars));