How about making the `as` optional if you just want to shadow the variable, 
plus automatic dereferencing?
    
    
    proc traverse(n: ref Node) =
      case n
      of BinaryOpr:
        traverse n.a
        traverse n.b
      
      of UnaryOpr:
        traverse n.a
      
      of Variable:
        echo n
      of Value:
        counter += n
    
    
    Run

Reply via email to