Turn a function in context into a proc