From 6b261eb6f8828c3a91484b73ab39f89411170e38 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Mon, 14 Nov 2016 15:58:56 -0500 Subject: [PATCH] Add an example for defstruct* --- .../scribblings/scribble/manual.scrbl | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/scribble-doc/scribblings/scribble/manual.scrbl b/scribble-doc/scribblings/scribble/manual.scrbl index 31af1260..88bf4598 100644 --- a/scribble-doc/scribblings/scribble/manual.scrbl +++ b/scribble-doc/scribblings/scribble/manual.scrbl @@ -1399,10 +1399,12 @@ definition. The @racket[defstruct*] form corresponds to @racket[struct], while @racket[defstruct] corresponds to @racket[define-struct]. Examples: + +An example using @racket[defstruct]: @codeblock[#:keep-lang-line? #f]|{ #lang scribble/manual @defstruct[sandwich ([protein ingredient?] [sauce ingredient?])]{ - A strucure type for sandwiches. Sandwiches are a pan-human foodstuff + A structure type for sandwiches. Sandwiches are a pan-human foodstuff composed of a partially-enclosing bread material and various ingredients. } @@ -1410,11 +1412,28 @@ Examples: @doc-render-examples[ @defstruct[#:link-target? #f sandwich ([protein ingredient?] [sauce ingredient?])]{ - A strucure type for sandwiches. Sandwiches are a pan-human foodstuff + A structure type for sandwiches. Sandwiches are a pan-human foodstuff composed of a partially-enclosing bread material and various ingredients. }] + +Additionally, an example using @racket[defstruct*]: +@codeblock[#:keep-lang-line? #f]|{ +#lang scribble/manual +@defstruct*[burrito ([salsa ingredient?] [tortilla ingredient?])]{ + A structure type for burritos. Burritos are a pan-human foodstuff + composed of a @emph{fully}-encolosed bread material and various + ingredients. } +}| +} +@doc-render-examples[ + @defstruct*[#:link-target? #f + burrito ([salsa ingredient?] [tortilla ingredient?])]{ + A structure type for burritos. Burritos are a pan-human foodstuff + composed of a @emph{fully}-encolosed bread material and various + ingredients. + }] @defform[(deftogether [def-expr ...] pre-flow ...)]{