On this page:
3.2.1 Show定义
gen:  Show
show:  show
Show?
3.2.2 Show一般操作
show
8.12

3.2 Show(生成可读字符串)🔗

3.2.1 Show定义🔗

接口

gen:Show

基本类型定义。最小实现为show:show

procedure

(show:show a)  string?

  a : Show?
gen:Show最小实现。

(struct User [name]
  #:methods gen:Show
  [(define/match (show:show user)
    [((User name)) (string-append "User: " name)])])

procedure

(Show? a)  boolean?

  a : any/c
3.2.2 Show一般操作🔗

procedure

(show a)  string?

  a : Show?
show:show别名。