Skip to content

Tweak apply and short-fn docstrings #1555

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

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

sogaiu
Copy link
Contributor

@sogaiu sogaiu commented Feb 6, 2025

This PR suggests tweaking the docstrings for apply and short-fn.

The changes are mostly about removing the contained examples, though there is also a slight clarification about the & args portion of apply as well.

During the 2025 Janetuary Community Project, a number of us studied and added some examples to the janet-lang.org repository.

We scanned through the existing docstrings and found that there were only four [1] that contained examples. apply already had examples at janet-lang.org and we added comparable ones for short-fn. It seems redundant and inconsistent [2] to keep the examples in the docstrings so this PR is a proposal to remove them.


On a side note, the remaining two items we found examples for in docstrings were:

  • debug/break
  • fiber/new

Assuming this PR (or something similar) is accepted, once appropriate examples have been added to janet-lang.org for the remaining two, we're thinking to do similarly for them too.


[1] It's possible we missed some, but it seems unlikely there are too many more.

[2] The inconsistency also manifests visually at the Core API page (and may be some would think it doesn't look that nice):

short-fn-on-core-api-page

@bakpakin bakpakin merged commit 5f550ea into janet-lang:master Feb 7, 2025
13 checks passed
@bakpakin
Copy link
Member

bakpakin commented Feb 7, 2025

Thanks, the new docstring definitely reads better.

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