Support for closures. fixes #29