Remove duplication of function factory example