R. C. Howell

Results 32 comments of R. C. Howell

Here's a modified example from an old project ```kotlin interface IRVisitor { fun visit(node: IRNode, ctx: C): R? = defaultVisit(node, ctx) // "reverse" visit for nodes A, B extending X...

You call `ctx` accumulator, but the visit doesn't have to be a fold. Visitor ctx like this is useful for passing arbitrary context (which may be an accumulator) like indentation...