Tweak apply and short-fn docstrings #1555
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR suggests tweaking the docstrings for
apply
andshort-fn
.The changes are mostly about removing the contained examples, though there is also a slight clarification about the
& args
portion ofapply
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 forshort-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):