Then using foo->doc would return a mapping or string describing the function and/or its parameters (if known and available). Alternately, one could create a function describe(foo) that does the same.
I am not a fan of the suggested f->doc syntax, what would be the reason to start using -> in this entirely new way for this one thing only?