a super-simple strict-typed function constructor.