added support for display in higher order functions

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>