-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore condition with non-generic type parameter #2173
Conversation
Should be working solution, but probably need some DRY treatment. |
Fix #2168 |
ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid as usual! Thanks buddy!
@@ -599,6 +599,21 @@ let internal colPreEx f2 f1 (c: seq<'T>) f (ctx: Context) = | |||
else | |||
colEx f1 c f (f2 ctx) | |||
|
|||
/// Similar to col, but apply two more functions fStart, fEnd at the beginning and the end if the input sequence is bigger thn one item | |||
let internal colSurr fStart fEnd f1 (c: list<'T>) f (ctx: Context) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit unsure about this abstraction at first.
I'm not entirely convinced col f1 c f
should be part of this abstraction.
At the same time, I have no example code where a more general abstraction would make sense, so let's just go with this.
else | ||
g) | ||
ctx | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove these additional newlines, triggers me a bit 🙈.
I changed the title due to this guidance, https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#pull-request-title |
* test * add TLongIdent option to TyparSupportsMember * format :) * DRY - new helper function: colSurr * format * Remove blank lines Co-authored-by: nojaf <[email protected]>
No description provided.