-
Notifications
You must be signed in to change notification settings - Fork 106
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
Added BatResult.{map,map_both} #705
Conversation
(** [map_both f g (Ok x)] returns [Ok (f x)] and [map_both f g (Bad e)] returns [Bad (g e)]. | ||
@since 2.5.4 | ||
*) | ||
val map_both : ('a -> 'b) -> ('c -> 'd) -> ('a, 'c) t -> ('b, 'd) t |
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 think this signature would be more readable with 'a1 -> 'a2
, 'b1 -> 'b2
.
val map : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t | ||
|
||
(** [map_both f g (Ok x)] returns [Ok (f x)] and [map_both f g (Bad e)] returns [Bad (g e)]. | ||
@since 2.5.4 |
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.
could you use NEXT_RELEASE
instead of 2.5.4
, so that we can replace with the correct version (which may not be 2.5.4) at release time?
Fixed. Should I also change the ChangeLog file? |
Yes, please. Thanks! |
Done! |
Thanks, I just merged. |
This resolves #704