Wraps object with a function call.