Improve completeness of some docstrings (#1791)

Co-authored-by: sogaiu <983021772@users.noreply.github.com>
This commit is contained in:
sogaiu
2026-08-15 12:06:05 -05:00
committed by GitHub
co-authored by sogaiu
parent 3f1b31a528
commit 1e91591c19
2 changed files with 44 additions and 22 deletions
+16 -6
View File
@@ -1349,14 +1349,24 @@
(tuple 'fn :juxt (tuple '& $args) (tuple/slice parts 0)))
(defn has-key?
"Check if a data structure `ds` contains the key `key`."
[ds key]
(not= nil (get ds key)))
``
Check if `x` maps `key` to a non-nil value.
`x` can be a bytes, indexed, dictionary, fiber, or abstract type
with a suitable `get` method.
``
[x key]
(not= nil (get x key)))
(defn has-value?
"Check if a data structure `ds` contains the value `value`. Will run in time proportional to the size of `ds`."
[ds value]
(not= nil (index-of value ds)))
``
Checks if `x` contains `value`.
`x` can be a bytes, indexed, dictionary, fiber, or abstract type with
suitable `get` and `next` methods.
``
[x value]
(not= nil (index-of value x)))
(defdyn *defdyn-prefix* ``Optional namespace prefix to add to keywords declared with `defdyn`.
Use this to prevent keyword collisions between dynamic bindings.``)