Which functions automatically generate new functions?

In his video http://www.wolfram.com/broadcast/video.php?channel=362&video=1643, Wolfram gives the following example: the output from

dict = Nearest[WordData[]]


is a NearestFunction object -- a function that may then be evaluated at an input such as:

dict["eleephannt"]


{elephant}

How can one determine which other functions func similarly generate a funcFunction?

(Not sure if the Title correctly captures the meaning of my question!)

• I think this is probably a bit too broad as it is, because there really isn't anything restricting one from writing these kinds of functions oneself, and they can freely appear in packages &c. Are you only interested in the built-in functions that have this kind of output? – Oleksandr R. Jun 26 '14 at 21:01
• Some generated functions that come to mind: NearestFunction, BooleanFunction, InterpolatingFunction, FittedModel, CompiledFunction, DataDistribution (yes, it's technically a distritbuion, but try evaluating dist["Properties"]), and even more in v10: APIFunction, TemplateObject, MeshRegion, CloudFunction, etc. – Szabolcs Jun 26 '14 at 21:03
• In addition, in v10 several list processing functions can be used to create a function object that can be passed around and used later. E.g. Select[OddQ] itself is a function. Try Select[OddQ][{1, 2, 3, 4, 5, 6, 7}]. – Szabolcs Jun 26 '14 at 21:06
• I don't think you can scrape Mathematica's namespace to find functions that return functions, because the weak typing of Mathematica implies that return types are generally unknown and you can't systematically query functions to see what they might return. – Sjoerd C. de Vries Jun 26 '14 at 21:43
• What is the motivation behind the question? Are you just looking for some examples that work like this or are you looking for a reliable programmatic way to decide whether something is a function? E.g. define functionQ which will return True when trying funcionQ@Nearest[{1,2,3}]? I think this really isn't possible in Mathematica (as Sjoerd pointed out). – Szabolcs Jun 26 '14 at 22:11