Skip to content

Conversation

@zzhengnan
Copy link
Contributor

@zzhengnan zzhengnan commented Jul 11, 2020

This PR contains

  • Typo fixes
  • Minor edits to make the docs "flow" a bit more naturally

I'll push the generated docs once the RST changes are considered LGTM.

Comment on lines 52 to 55
def do_laundry(clothes):
wet_clothes = wash(clothes, coins)
dry_clothes = dry(wet_clothes, coins)
wet_clothes = wash(clothes)
dry_clothes = dry(wet_clothes)
return fold(dry_clothes)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel the presence of coins is somewhat antithetical to the principal of function purity as described in the docs.

Comment on lines 10 to +11
>>> double = partial(mul, 2) # Partial evaluation
>>> doubled = double(2) # Currying
>>> doubled = double(5) # Currying
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel the choice of passing in 2 might be slightly confusing for some people given the function itself is called double.

... map(get([1, 2])),
... list)
Note: this uses the `curried`_ versions of ``map`` and ``filter``.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing cross linking because the page is not rendering correctly, as seen below.

image

>>> valmap(compose(sum, pluck(2)),
... _)
... _) # The underscore captures results from the previous prompt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might not be obvious to everyone.


Toolz functions can be combined to make functions that, while common, aren't
a part of toolz's standard library. This section presents
a part of toolz's standard offerings. This section presents
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid confusion with the python standard library.

@zzhengnan
Copy link
Contributor Author

@eriknw I saw you were adde as a maintainer and merged #494 (which is also related to documentation) shortly after I'd opened this PR. Could you give this a quick glance? Thanks!

@eriknw eriknw merged commit ab8fd84 into pytoolz:master Sep 21, 2020
@eriknw
Copy link
Member

eriknw commented Sep 21, 2020

This looks great! Thanks so much @zzhengnan!

Sorry for the delay. I'm striving to be more responsive towards toolz. Contributions are always welcome and appreciated. Thanks again @zzhengnan 😄

@zzhengnan zzhengnan deleted the update-docs branch September 21, 2020 22:56
@zzhengnan
Copy link
Contributor Author

@eriknw Thanks for the review!

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.

2 participants