Browse files

struct is preferred

changed 'make-struct' to struct
1 parent 00f0311 commit 5ef5a4f3cf726ceb9f6866eeeca7648d8162b1dd @spdegabrielle spdegabrielle committed with stamourv Aug 25, 2016
Showing with 4 additions and 4 deletions.
  1. +4 −4 pkgs/racket-doc/scribblings/reference/match.scrbl
View
8 pkgs/racket-doc/scribblings/reference/match.scrbl
@@ -241,8 +241,8 @@ In more detail, patterns match as follows:
@examples[
#:eval match-eval
- (eval:no-prompt (define-struct tree (val left right)))
- (match (make-tree 0 (make-tree 1 #f #f) #f)
+ (eval:no-prompt (struct tree (val left right)))
+ (match (tree 0 (tree 1 #f #f) #f)
[(tree a (tree b _ _) _) (list a b)])
]}
@@ -735,8 +735,8 @@ not provided, it defaults to @racket[equal?].
@examples[
#:eval match-eval
(eval:no-prompt
- (define-struct tree (val left right)))
- (match (make-tree 0 (make-tree 1 #f #f) #f)
+ (struct tree (val left right)))
+ (match (tree 0 (tree 1 #f #f) #f)
[(struct* tree ([val a]
[left (struct* tree ([right #f] [val b]))]))
(list a b)])

0 comments on commit 5ef5a4f

Please sign in to comment.