fix mistake in constant

* constant returns a function rather than a type