more tweaking docs...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-10-01 00:09:30 +03:00
parent 9d0deba153
commit 6f6d316be4

View File

@ -12,7 +12,7 @@ An extensible tree walk(..) framework...
- [API](#api) - [API](#api)
- [`walk(..)`](#walk) - [`walk(..)`](#walk)
- [`getter(..)`](#getter) - [`getter(..)`](#getter)
- [`done(..)` (optional)](#done-optional) - [`done(..)`](#done)
- [Examples](#examples) - [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.* *Note that `stop(..)` behaves in a similar manner to `return`, i.e. execution is aborted immidiately.*
### `done(..)` (optional) ### `done(..)`
`done(state) -> state` `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(..)`. 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(..)`.