[functions.constant] updated to new interface

matrixvalued implementation is still missing