def register(name, fn = nil, &block)
      self.class.new(methods.merge(name => fn || block))
    end
def register(name, fn = nil, &block)
      self.class.new(methods.merge(name => fn || block))
    end
Register a new function

 @example
   store.register(:to_json, -> v { v.to_json })
   store.register(:to_json) { |v| v.to_json }