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

Update official docs #491

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Update official docs #491

merged 1 commit into from
Sep 21, 2020

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.

@@ -38,7 +38,7 @@ These functions correspond to the SQL commands ``SELECT`` and ``WHERE``.
... 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

@@ -89,7 +89,7 @@ groups.
'M': [(2, 'Bob', 200, 'M'), (3, 'Charlie', 150, 'M'), (4, 'Dennis', 50, 'M')]}

>>> 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.

@@ -2,7 +2,7 @@ Tips and Tricks
===============

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