Mustache.js Render is Not Defined

I ran into the above-mentioned error while trying to learn about lambdas in Mustache. According to the documentation, if your data looks like this:

{
  "name": "Willy",
  "wrapped": function() {
    return function(text) {
      return "<b>" + render(text) + "</b>"
    }
  }
}

And your template looks like this:

   is awesome.

You should get something like this as output:

<b>Willy is awesome.</b>

However, when you run this you get something like this in your JS console:

Uncaught ReferenceError: render is not defined

This is because the documentation fails to show you where the render method is defined. In reality, your data should look like this:

{
  "name": "Willy",
  "wrapped": function() {
    return function(text,render) {
      return "<b>" + render(text) + "</b>"
    }
  }
}

What the documentation forgets to mention is that the render method is passed in along with the text. Hopefully this helps someone avoid some frustration.