Skip to content

Commit 7ffbd50

Browse files
kovanclaude
authored andcommitted
Fix 21 typos in stdlib docstrings
Fix spelling errors and trailing whitespace in documentation strings across 10 library files. Changes include: - "bount" → "bound" (loops.lisp) - "interator" → "iterator" (hashmap, iterator, queue) - "Raturns" → "Returns" (hashmap, ordmap) - "occurence" → "occurrence" (list) - "elmentary" → "elementary" (elementary.lisp) - "yeilds" → "yields" (slice) - "imples" → "implies" (classes) - "is sometimes goes" → "sometimes goes" (list) - Missing/extra periods and trailing spaces AI was used to help identify these typos. All changes have been manually reviewed against the source code. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 326c3d3 commit 7ffbd50

10 files changed

Lines changed: 22 additions & 22 deletions

File tree

library/classes.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ together."
308308
;;
309309

310310
(define-class (Into :a :b)
311-
"`INTO` imples *every* element of `:a` can be represented by an element of `:b`. This conversion might not be bijective (i.e., there may be elements in `:b` that don't correspond to any in `:a`)."
311+
"`INTO` implies *every* element of `:a` can be represented by an element of `:b`. This conversion might not be bijective (i.e., there may be elements in `:b` that don't correspond to any in `:a`)."
312312
(into (:a -> :b)))
313313

314314
(define-class ((Into :a :b) (Into :b :a) => Iso :a :b)
315-
"Opting into this marker typeclass imples that the instances for `(Into :a :b)` and `(Into :b :a)` form a bijection.")
315+
"Opting into this marker typeclass implies that the instances for `(Into :a :b)` and `(Into :b :a)` form a bijection.")
316316

317317
(define-instance (Into :a :a)
318318
(define (into x) x))
@@ -406,7 +406,7 @@ Typical `fail` continuations are:
406406
(declare defaulting-unwrap ((Unwrappable :container) (Default :element) =>
407407
(:container :element) -> :element))
408408
(define (defaulting-unwrap container)
409-
"Unwrap an `unwrappable`, returning `(default)` of the wrapped type on failure. "
409+
"Unwrap an `unwrappable`, returning `(default)` of the wrapped type on failure."
410410
(unwrap-or-else (fn (elt) elt)
411411
(fn () (default))
412412
container))

library/experimental/loops.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,19 +308,19 @@ COALTON::UNIT/UNIT
308308
`(%sometimes ,count (fn (,variable) ,@body)))
309309

310310
(defmacro sumtimes ((variable count) cl:&body body)
311-
"The sum of `body` for `variable` bount to every `UFix` in [0, `count`)."
311+
"The sum of `body` for `variable` bound to every `UFix` in [0, `count`)."
312312
`(%sumtimes ,count (fn (,variable) ,@body)))
313313

314314
(defmacro prodtimes ((variable count) cl:&body body)
315-
"The product of `body` for `variable` bount to every `UFix` in [0, `count`)."
315+
"The product of `body` for `variable` bound to every `UFix` in [0, `count`)."
316316
`(%prodtimes ,count (fn (,variable) ,@body)))
317317

318318
(defmacro collecttimes ((variable count) cl:&body body)
319319
"Collect the results of evaluating `body` for `variable` bound to every `UFix` in [0, `count`) as a `List`."
320320
`(%collecttimes ,count (fn (,variable) ,@body)))
321321

322322
(defmacro besttimes ((variable count better?) cl:&body body)
323-
"The result of evaluating `body` with `variable` bound to a `UFix` in [0, `count`) that is `better?` than the result of evaluating `body` with `variable` bound to the rest of the `UFix`s in [0, `count`).."
323+
"The result of evaluating `body` with `variable` bound to a `UFix` in [0, `count`) that is `better?` than the result of evaluating `body` with `variable` bound to the rest of the `UFix`s in [0, `count`)."
324324
`(%besttimes ,count ,better? (fn (,variable) ,@body)))
325325

326326
(defmacro argbesttimes ((variable count better?) cl:&body body)

library/hashmap.lisp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -693,19 +693,19 @@ new value, if the key was found."
693693
;; API
694694
(declare keys (Hash :k => HashMap :k :v -> (iter:Iterator :k)))
695695
(define (keys hm)
696-
"Returns an interator to iterate over all the keys in a hashmap hm."
696+
"Returns an iterator over all the keys in a hashmap hm."
697697
(iter:new (->generator hm (fn (k _) k))))
698698

699699
;; API
700700
(declare values (Hash :k => HashMap :k :v -> (iter:Iterator :v)))
701701
(define (values hm)
702-
"Returns an interator to iterate over all the values in a hashmap hm."
702+
"Returns an iterator over all the values in a hashmap hm."
703703
(iter:new (->generator hm (fn (_ v) v))))
704704

705705
;; API
706706
(declare entries (Hash :k => HashMap :k :v -> (iter:Iterator (Tuple :k :v))))
707707
(define (entries hm)
708-
"Returns an interator to iterate over all entries in hashmap hm."
708+
"Returns an iterator over all entries in hashmap hm."
709709
(iter:new (->generator hm Tuple)))
710710
)
711711

@@ -767,12 +767,12 @@ The entries from A remains in the result."
767767

768768
(declare difference (Hash :k => HashMap :k :v -> HashMap :k :v -> HashMap :k :v))
769769
(define (difference a b)
770-
"Raturns a HashMap that contains mappings in `a` but not in `b`."
770+
"Returns a HashMap that contains mappings in `a` but not in `b`."
771771
(iter:fold! (fn (m (Tuple k _v)) (remove m k)) a (iter:into-iter b)))
772772

773773
(declare xor (Hash :k => HashMap :k :v -> HashMap :k :v -> HashMap :k :v))
774774
(define (xor a b)
775-
"Raturns a HashMap that contains mappings either in `a` or in `b`,
775+
"Returns a HashMap that contains mappings either in `a` or in `b`,
776776
but not in both."
777777
(iter:fold! (fn (m (Tuple k v))
778778
(fst (update m k

library/iterator.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Equivalent to reversing `range-increasing`"
304304

305305
(declare interleave! (Iterator :a -> Iterator :a -> Iterator :a))
306306
(define (interleave! left right)
307-
"Return an interator of interleaved elements from LEFT and RIGHT which terminates as soon as both LEFT and RIGHT do.
307+
"Return an iterator of interleaved elements from LEFT and RIGHT which terminates as soon as both LEFT and RIGHT do.
308308
309309
If one iterator terminates before the other, elements from the longer iterator will be yielded without
310310
interleaving. (interleave empty ITER) is equivalent to (id ITER)."
@@ -350,7 +350,7 @@ interleaving. (interleave empty ITER) is equivalent to (id ITER)."
350350

351351
(declare filter! ((:elt -> Boolean) -> Iterator :elt -> Iterator :elt))
352352
(define (filter! keep? iter)
353-
"Return an iterator over the elements from ITER for which KEEP?returns true."
353+
"Return an iterator over the elements from ITER for which KEEP? returns true."
354354
(let ((filter-iter (fn (u)
355355
(match (next! iter)
356356
((None) None)

library/list.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
(declare car (List :a -> :a))
110110
(define (car x)
111-
"Return the traditional car of a list. This function is partial"
111+
"Return the traditional car of a list. This function is partial."
112112
(match x
113113
((Cons x _) x)
114114
((Nil) (error "there is no first element"))))
@@ -425,7 +425,7 @@
425425

426426
(declare difference (Eq :a => ((List :a) -> (List :a) -> (List :a))))
427427
(define (difference xs ys)
428-
"Returns a new list with the first occurence of each element in `ys` removed from `xs`."
428+
"Returns a new list with the first occurrence of each element in `ys` removed from `xs`."
429429
(fold (fn (a b) (remove b a)) xs ys))
430430

431431
(declare zipWith ((:a -> :b -> :c) -> (List :a) -> (List :b) -> (List :c)))
@@ -662,7 +662,7 @@
662662

663663
(declare combs (List :a -> (List (List :a))))
664664
(define (combs l)
665-
"Compute a list of all combinations of elements of `l`. This function is sometimes goes by the name \"power set\" or \"subsets\".
665+
"Compute a list of all combinations of elements of `l`. This function sometimes goes by the name \"power set\" or \"subsets\".
666666
667667
The ordering of elements of `l` is preserved in the ordering of elements in each list produced by this function."
668668
(match l

library/math/arith.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ The function `general/` is partial, and will error produce a run-time error if t
168168
(inline)
169169
(declare ash (Integer -> Integer -> Integer))
170170
(define (ash x n)
171-
"Compute the \"arithmetic shift\" of `x` by `n`. "
171+
"Compute the \"arithmetic shift\" of `x` by `n`."
172172
(lisp Integer (x n) (cl:ash x n)))
173173

174174
(inline)

library/math/elementary.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ For a complex number `z = (complex x y)`, the following identities hold:
175175
(Tuple r theta)))
176176

177177
(cl:defmacro %define-real-float-elementary (coalton-type underlying-type)
178-
"Defines the elmentary instances for a lisp floating-point type"
178+
"Defines the elementary instances for a lisp floating-point type."
179179
`(coalton-toplevel
180180
(define-instance (Trigonometric ,coalton-type)
181181
(inline)

library/ordmap.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,14 @@ The resulting values are from `a`."
273273

274274
(declare difference (Ord :key => OrdMap :key :value -> OrdMap :key :value -> OrdMap :key :value))
275275
(define (difference a b)
276-
"Raturns an OrdMap that contains mappings in `a` but not in `b`."
276+
"Returns an OrdMap that contains mappings in `a` but not in `b`."
277277
(let (%Map ta) = a)
278278
(let (%Map tb) = b)
279279
(%Map (tree:difference ta tb)))
280280

281281
(declare xor (Ord :key => OrdMap :key :value -> OrdMap :key :value -> OrdMap :key :value))
282282
(define (xor a b)
283-
"Raturns an OrdMap that contains mappings either in `a` or in `b`,
283+
"Returns an OrdMap that contains mappings either in `a` or in `b`,
284284
but not in both."
285285
(let (%Map ta) = a)
286286
(let (%Map tb) = b)

library/queue.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190

191191
(declare items! (Queue :a -> iter:Iterator :a))
192192
(define (items! q)
193-
"Returns an interator over the items of `q`, removing items as they are returned."
193+
"Returns an iterator over the items of `q`, removing items as they are returned."
194194
(iter:with-size
195195
(fn ()
196196
(pop! q))

library/slice.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
(declare iter-sliding ((Sliceable (:b :a)) => UFix -> :b :a -> iter:Iterator (Slice :a)))
102102
(define (iter-sliding size s)
103-
"Returns an iterator that yeilds a series of overlapping slices of length `size`."
103+
"Returns an iterator that yields a series of overlapping slices of length `size`."
104104
(let length = (%length s))
105105
(let offset_ = (cell:new 0))
106106
(iter:with-size

0 commit comments

Comments
 (0)