subtantial change to API, support for functions in implicits, almost done with #1