==(other)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def ==(other)
  other.is_a?(self.class) && other.name == name && other.args == args
end
             
             
            
           
          
          
          
          
         
      
        
          
          
          
            each_type(&block)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def each_type(&block)
  if block
    args.each(&block)
  else
    enum_for :each_type
  end
end
             
             
            
           
          
          
         
      
        
          
          
          
            eql?(other)
            click to toggle source
          
          
          
  
            
            
            
            
          
          
          
          
          
         
      
        
          
          
          
            free_variables(set = Set.new)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def free_variables(set = Set.new)
  set.tap do
    args.each do |arg|
      arg.free_variables(set)
    end
  end
end
             
             
            
           
          
          
         
      
        
          
          
          
            hash()
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def hash
  self.class.hash ^ name.hash ^ args.hash
end
             
             
            
           
          
          
         
      
        
          
          
          
            to_s(level = 0)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def to_s(level = 0)
  if args.empty?
    name.to_s
  else
    "#{name}[#{args.join(", ")}]"
  end
end