Remove parens from nullary tag constructors in docs
This commit is contained in:
parent
727970c230
commit
e2d36e00ce
|
@ -1990,22 +1990,22 @@ module system).
|
||||||
An example of a @code{tag} item and its use:
|
An example of a @code{tag} item and its use:
|
||||||
@example
|
@example
|
||||||
tag animal @{
|
tag animal @{
|
||||||
dog();
|
dog;
|
||||||
cat();
|
cat;
|
||||||
@}
|
@}
|
||||||
|
|
||||||
let animal a = dog();
|
let animal a = dog;
|
||||||
a = cat();
|
a = cat;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
An example of a @emph{recursive} @code{tag} item and its use:
|
An example of a @emph{recursive} @code{tag} item and its use:
|
||||||
@example
|
@example
|
||||||
tag list[T] @{
|
tag list[T] @{
|
||||||
nil();
|
nil;
|
||||||
cons(T, @@list[T]);
|
cons(T, @@list[T]);
|
||||||
@}
|
@}
|
||||||
|
|
||||||
let list[int] a = cons(7, cons(13, nil()));
|
let list[int] a = cons(7, cons(13, nil));
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
||||||
|
@ -3401,9 +3401,9 @@ control enters the block.
|
||||||
An example of a pattern @code{alt} statement:
|
An example of a pattern @code{alt} statement:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
type list[X] = tag(nil(), cons(X, @@list[X]));
|
type list[X] = tag(nil, cons(X, @@list[X]));
|
||||||
|
|
||||||
let list[int] x = cons(10, cons(11, nil()));
|
let list[int] x = cons(10, cons(11, nil));
|
||||||
|
|
||||||
alt (x) @{
|
alt (x) @{
|
||||||
case (cons(a, cons(b, _))) @{
|
case (cons(a, cons(b, _))) @{
|
||||||
|
|
Loading…
Reference in New Issue