class Steep::Interface::Block

def ==(other)

def ==(other)
  other.is_a?(self.class) && other.type == type && other.optional == optional
end

def closed?

def closed?
  type.closed?
end

def free_variables

def free_variables
  type.free_variables
end

def initialize(type:, optional:)

def initialize(type:, optional:)
  @type = type
  @optional = optional
end

def optional?

def optional?
  @optional
end

def subst(s)

def subst(s)
  self.class.new(
    type: type.subst(s),
    optional: optional
  )
end

def to_s

def to_s
  "#{optional? ? "?" : ""}{ #{type.params} -> #{type.return_type} }"
end