Find globals in an expression by searching through the chain

find_globals_recursively(code, envir)

Arguments

code

An expression to search for globals

envir

The environment from which to begin the search