Skip to content
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

chore: rename xf to transducerCreator #3088

Merged

Conversation

adispring
Copy link
Member

When I looked into some source code of ramda related to transducer, and some other articles about transducer, I found out that xf in _dispatchable is not a transducer, but a transducer constructor.

So in order to make the description more clear, I rename xf to transducerCreator.

Copy link
Member

@CrossEye CrossEye left a comment

Choose a reason for hiding this comment

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

Except for a minor nit in the comment wording, this makes sense to me.

Any objectsions, @ramda/core?

* Otherwise, it will default to executing [fn].
*
* @private
* @param {Array} methodNames properties to check for a custom implementation
* @param {Function} xf transducer to initialize if object is transformer
* @param {Function} transducerCreator transducer constructor if object is transformer
Copy link
Member

Choose a reason for hiding this comment

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

Very minor nit. I would use factory here instead of constructor. This is not a constructor function (called with new), so I would avoid the word to avoid confusion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I have changed transducer constructor to transducer factory

Copy link
Member

@Bradcomp Bradcomp left a comment

Choose a reason for hiding this comment

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

:bowtie:

@CrossEye CrossEye merged commit bd14381 into ramda:master Sep 22, 2020
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.

None yet

3 participants