Skip to content

Conversation

@chenglou
Copy link
Member

@chenglou chenglou commented Mar 15, 2018

Addresses feedback regarding similarity to JS terminology. Fewer keystrokes, so I guess it's nice anyway.

Same for the uncurried version, and map.

Hopefully this is the last piece of naming-related bikeshedding we need to do for a while.

[@@ocaml.deprecated "Use mapRight instead"]

val mapRight: 'a t -> ('a -> 'b) -> 'b t
(** [mapRight a f]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name mapRight does not feel right to me, what do other people think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need a map right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree... mapRight/mapReverse doesn't sound like something we should expose

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cullophid for perf reasons, mapReverse is in general faster than map (more true in native backend), it is also available in original stdlib.

I feel Reverse is a better name than Right which does not assume the direction, note my original name is Right, but later changed to Reverse per feedback, now changed again per feedback...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobzhang ah and because ocaml has sideeffects the order actually makes a difference.

Addresses feedback regarding similarity to JS terminology. Fewer
keystrokes, so I guess it's nice anyway.

Same for the uncurried version, and map.

Hopefully this is the last piece of naming-related bikeshedding we need
to do for a while.
@cristianoc
Copy link
Collaborator

closing very old PRs

@cristianoc cristianoc closed this Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants