added support for recursive function types