Because javascript functions are not serializable, in order to pass them into new contexts sometimes (albeit rarely) it can be useful to stringify them then re-evaluate them later like:

```
const foo = () => { // do something }
const fooText = foo.toString()

// later... in new context & scope
const fooFunc = new Function(' return (' + fooText + ').apply(null, arguments)')
fooFunc() // works!

```

However, if `foo` references another function `bar`, the scope is not stringified, **so if `bar` is not defined in the new context, the evaluated foo function will throw an error when called.**

I'm wondering if there is a way to stringify a function recursively?
--------------------------------------------------------------------

That is, not only stringifying the parent function, but also stringifying the contents of the child functions called from the parent.

### For Example:

```
let bar = () => { alert(1) }
let foo = () => { bar() }

// what toString does
let fooString = foo.toString()
console.log(fooString) // "() => { bar() }"

// what we want
let recursiveFooString = foo.recursiveToString()
console.log(recursiveFooString) // "() => { alert(1) }"

```

Let me know if you have any ideas on how to accomplish something like a "recursiveToString"