added support for rql higher order functions
added function generator tests