WIP: lazy functions with >2 args
add codegen test for mat