make changes suggested by folkertdev

This commit is contained in:
Lunarmagpie 2022-12-23 11:01:50 -05:00
parent db9c00ec1e
commit 3265a786a5
No known key found for this signature in database
GPG Key ID: 157C5FCADDCAA093
2 changed files with 5 additions and 3 deletions

View File

@ -279,8 +279,8 @@ fn to_expr_report<'a>(
alloc.reflow("The arrow "),
alloc.parser_suggestion("->"),
alloc.reflow(" is only used to define cases in a "),
alloc.keyword("when"),
alloc.reflow("."),
alloc.keyword("`when`"),
alloc.reflow("expression:"),
]),
alloc
.vcat(vec![
@ -289,6 +289,8 @@ fn to_expr_report<'a>(
alloc.text("Green -> \"go!\"").indent(4),
])
.indent(4),
alloc.reflow("And to define a function:"),
alloc.reflow("increment = \\n -> n + 1").indent(4),
])]
}
},

View File

@ -5651,7 +5651,7 @@ All branches in an `if` must have the same type!
Red -> "stop!"
Green -> "go!"
And defining functions:
And to define a function:
increment = \n -> n + 1