Mapping and Visiting in Functional and Object-Oriented Programming


class Exp{<lb>public abstract T Accept<T,D>(Visitor<T,D> v, D x);<lb>}<lb>class PlusExp : Exp {<lb>private Exp e1, e2;<lb>public PlusExp(Exp a, Exp b){<lb>e1 = a;<lb>e2 = b;<lb>}<lb>public Exp LeftOperand{get {return e1;}}<lb>public Exp RightOperand{get {return e2;}}<lb>public override T Accept<T,D>(Visitor<T,D> v, D x){<lb>return v.Visit(this, x);<lb>}<lb… (More)
DOI: 10.5381/jot.2008.7.7.a2


Figures and Tables

Sorry, we couldn't extract any figures or tables for this paper.

Slides referencing similar topics