def tld_rewriter(new_tld): """returns a function that rewrites the TLD of a URL to be new_tld""" return expose(lambda url: rewrite_tld(url, new_tld))