added support for conversion to scala.Function0