Closed freshtonic closed 8 years ago
@joshprice @plasticine seeking feedback.
I'm happy with the small number of lines this is implemented in. I hope it's fairly easy to follow.
The idea is that you can call ASTReducer.reduce(..., visitor, ...)
and have it return a an arbitrary data structure depending on the visitor you pass in.
I want to implement an Elixir version of the TypeInfo
visitor from graphql-js
using this, next.
:+1: looks good, formatting changes then :ship:
:+1:
This is essentially a functional-style implementation of the OO "visitor" pattern.