hamt.js
function lazyVisit(node, f, k) {
    switch (node.type) {
        case LEAF:
            return {
                value: f(node),
                rest: k
            };

        case COLLISION:
        case ARRAY:
        case INDEX:
            var children = node.children;
            return lazyVisitChildren(children.length, children, 0, f, k);

        default:
            return appk(k);
    }
}
function lazyVisit(node, f, k) {
    switch (node.type) {
        case LEAF:
            return {
                value: f(node),
                rest: k
            };

        case COLLISION:
        case ARRAY:
        case INDEX:
            var children = node.children;
            return lazyVisitChildren(children.length, children, 0, f, k);

        default:
            return appk(k);
    }
}
function lazyVisit ( node , f , k ) { switch ( node . type ) { case LEAF : return { value : f ( node ) , rest : k } ; case COLLISION : case ARRAY : case INDEX : var children = node . children ; return lazyVisitChildren ( children . length , children , 0 , f , k ) ; default : return appk ( k ) ; } }
Recursively visit all values stored in `node` lazily.
Recursively visit all values stored in node lazily .