diff --git a/README.md b/README.md index 89aa077..5b375eb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ An extensible tree walk(..) framework... - [API](#api) - [`walk(..)`](#walk) - [`getter(..)`](#getter) - - [`done(..)` (optional)](#done-optional) + - [`done(..)`](#done) - [Examples](#examples) @@ -164,7 +164,7 @@ Stop walking and return `state`. The passed `state` is directly returned from th *Note that `stop(..)` behaves in a similar manner to `return`, i.e. execution is aborted immidiately.* -### `done(..)` (optional) +### `done(..)` `done(state) -> state` User provided function, if given, is called by the *walker* after walking is done (no more nodes to handle). `state` is passed as argument and the return value is returned from the *walker*. This is run in the same context (`this`) as `getter(..)`.