Extract a function.