code: func (t *Function) MarshalJSON() ([]byte, error) {
  	repr := map[string]interface{}{
  		"type": t.typeMarker(),
  	}
  	if len(t.args) > 0 {
  		repr["args"] = t.args
  	}
  	if t.result != nil {
  		repr["result"] = t.result
  	}
  	return json.Marshal(repr)
  }
docs: // MarshalJSON returns the JSON encoding of t.