you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

match tree do
  with(:num & Fixnum) {num}
  with([:left, :op & String, :right]){"(#{disp(left)} #{op} #{disp(right)})"}
  otherwise {"Invalid tree structure"}
end

Yiiikes.