You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[<Fact>]let``first lamba`` ()=// You can use the `fun` keyword to write lambda's.// Mind the -> instead of C#'s =>// TODO: complete the lambda so that the value is returned in uppercase.lettoUpperCase=fun a -> a
// ref: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keywordletname="Joey"letuppercased= toUpperCase name
Assert.Equal("JOEY", uppercased)
Result
[<Fact>]let``first lamba`` ()=// You can use the `fun` keyword to write lambda's.// Mind the -> instead of C#'s =>// TODO: complete the lambda so that the value is returned in uppercase.lettoUpperCase=fun a -> a
// ref: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keywordletname="Joey"letuppercased= toUpperCase name
Assert.Equal("JOEY", uppercased)
Problem description
Was not expected the newline in this case.
Extra information
The formatted result breaks by code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
[<Fact>]let``update a record`` ()=letrecord={ Name ="1"; ReleaseYear =2001}// notice how the member can be put on a single line if you separate them with a `;`.// In fact the `;` in F# indicates as a newline in certain scenario's. More on that when we get to lists.letcorrectedRecord= record // TODO: update the ReleaseYear to 2000
Assert.Equal(2000, correctedRecord.ReleaseYear)
nojaf
added a commit
to nojaf/fantomas
that referenced
this issue
May 9, 2021
Issue created from fantomas-online
Code
Result
Problem description
Was not expected the newline in this case.
Extra information
Options
Fantomas Master at 05/08/2021 20:14:38 - 768402e
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The text was updated successfully, but these errors were encountered: