struct is preferred

changed 'make-struct' to struct
This commit is contained in:
Stephen De Gabrielle 2016-08-25 16:27:32 +01:00 committed by Vincent St-Amour
parent 00f0311473
commit 5ef5a4f3cf

View File

@ -241,8 +241,8 @@ In more detail, patterns match as follows:
@examples[ @examples[
#:eval match-eval #:eval match-eval
(eval:no-prompt (define-struct tree (val left right))) (eval:no-prompt (struct tree (val left right)))
(match (make-tree 0 (make-tree 1 #f #f) #f) (match (tree 0 (tree 1 #f #f) #f)
[(tree a (tree b _ _) _) (list a b)]) [(tree a (tree b _ _) _) (list a b)])
]} ]}
@ -735,8 +735,8 @@ not provided, it defaults to @racket[equal?].
@examples[ @examples[
#:eval match-eval #:eval match-eval
(eval:no-prompt (eval:no-prompt
(define-struct tree (val left right))) (struct tree (val left right)))
(match (make-tree 0 (make-tree 1 #f #f) #f) (match (tree 0 (tree 1 #f #f) #f)
[(struct* tree ([val a] [(struct* tree ([val a]
[left (struct* tree ([right #f] [val b]))])) [left (struct* tree ([right #f] [val b]))]))
(list a b)]) (list a b)])