mirror of
https://github.com/flynx/walk.js.git
synced 2025-10-29 19:10:11 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
6f6d316be4
commit
3f106b5155
7
walk.js
7
walk.js
@ -13,13 +13,11 @@
|
|||||||
// walk(getter(..))
|
// walk(getter(..))
|
||||||
// walk(getter(..), done(..))
|
// walk(getter(..), done(..))
|
||||||
// -> walker(state, ...nodes)
|
// -> walker(state, ...nodes)
|
||||||
// -> state
|
|
||||||
//
|
//
|
||||||
// Construct a walker with a curried start state...
|
// Construct a walker with a curried start state...
|
||||||
// walk(getter(..), state)
|
// walk(getter(..), state)
|
||||||
// walk(getter(..), done(..), state)
|
// walk(getter(..), done(..), state)
|
||||||
// -> walker(...nodes)
|
// -> walker(...nodes)
|
||||||
// -> state
|
|
||||||
//
|
//
|
||||||
// Walk the set of nodes...
|
// Walk the set of nodes...
|
||||||
// walk(getter(..), state, ...nodes)
|
// walk(getter(..), state, ...nodes)
|
||||||
@ -33,12 +31,12 @@
|
|||||||
// feasible to do a version of .map(..), i.e. a mechanism to modify/clone
|
// feasible to do a version of .map(..), i.e. a mechanism to modify/clone
|
||||||
// the input...
|
// the input...
|
||||||
// XXX can we hint chrome to show the two singatures???
|
// XXX can we hint chrome to show the two singatures???
|
||||||
// XXX EXPERIMENTAL: done(..) handler is not yet final...
|
// XXX need to remove the restriction of not being able to pass functions
|
||||||
|
// into state unless done(..) is given...
|
||||||
var walk =
|
var walk =
|
||||||
module.walk =
|
module.walk =
|
||||||
function(getter, state, ...nodes){
|
function(getter, state, ...nodes){
|
||||||
// normalize the args...
|
// normalize the args...
|
||||||
// XXX EXPERIMENTAL...
|
|
||||||
var done
|
var done
|
||||||
// we've got a done handler passed...
|
// we've got a done handler passed...
|
||||||
if(state instanceof Function){
|
if(state instanceof Function){
|
||||||
@ -149,7 +147,6 @@ function(getter, state, ...nodes){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call the done handler...
|
// call the done handler...
|
||||||
// XXX EXPERIMENTAL...
|
|
||||||
res = done ?
|
res = done ?
|
||||||
done.call(context, res)
|
done.call(context, res)
|
||||||
: res
|
: res
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user