Closed stefanobaghino closed 1 year ago
This seems pointing towards the direction given by the book in one of the challenges:
The Visitor pattern lets you emulate the functional style in an object-oriented language. Devise a complementary pattern for a functional language. It should let you bundle all of the operations on one type together and let you define new types easily.
(SML or Haskell would be ideal for this exercise, but Scheme or another Lisp works as well.)
No longer relevant.
Right now, parsing is implemented using the visitor pattern. This is useful writing Java, but it's probably better expressed in Scala using pattern matching. Evaluate this refactoring and possibly implement it. Ideally, write down as a comment which direction you decided to take and why.