From 6f6d316be4a891663e9b7ef8b7795cfaabe5680c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 1 Oct 2018 00:09:30 +0300 Subject: [PATCH] more tweaking docs... Signed-off-by: Alex A. Naanou --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(..)`.