Support output functions: . and r
Implement promises