inspect: support functions
test: add tests for function inspection