Get GeneratorFunction by using Function constructor

issue #61