-
Notifications
You must be signed in to change notification settings - Fork 230
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
empty?
should be documented more clearly.
#1383
Comments
I think the Janet doc means "Check if xs has a null valence ( from latin ne ullus, "not one") if I were to use array theory terminology. ... or even "Check if xs has a null length". |
Define |
|
It is true that it's not spelled out explicitly what For reference, this seems to be the case in the docstrings for the following as well: |
I've gone over the list above and based on each of the corresponding docstrings, I don't think it's unclear what
FWIW, these all have have signatures that contain For For [1] All of the implementations have bits that refer to Update: There are examples of usages of |
For reference, AFAICT, (defn empty? "Check if xs is empty." [xs] (= 0 (length xs))) In 2021-01, in this commit a change was made to not use (defn empty? "Check if xs is empty." [xs] (= nil (next xs nil))) In either case I think there is a hint in the commit message from the latter commit about intent:
That the type of thing [1] For the built-in types, |
What? Define empty. I thought
nil
was empty.The text was updated successfully, but these errors were encountered: