[plt-scheme] Typos in the Scribblings for scheme/vector
Hello all,
Let me know if there is a place to report this sort of thing on the PLaneT Trac (I couldn't find a good category for it). There are some typos in the Scribblings for scheme/vector---some of the argument/return types are list? instead of vector? and there are a couple of "then"s missing in the exception parts of the contract. The following diff (against today's SVN) fixes all the ones I found, and typesets cleanly on my system.
Thanks,
Will
Diff Follows:
---------------------------------------
Index: vectors.scrbl
===================================================================
--- vectors.scrbl (revision 17141)
+++ vectors.scrbl (working copy)
@@ -184,7 +184,7 @@
v
]}
- at defproc[(vector-append [lst list?] ...) list?]{
+ at defproc[(vector-append [vec vector?] ...) vector?]{
Creates a fresh vector that contains all
of the elements of the given vectors in order.
@@ -194,19 +194,19 @@
}
- at defproc[(vector-take [vec vector?] [pos exact-nonnegative-integer?]) list?]{
+ at defproc[(vector-take [vec vector?] [pos exact-nonnegative-integer?]) vector?]{
Returns a fresh vector whose elements are the first @scheme[pos] elements of
@scheme[vec]. If @scheme[vec] has fewer than
- at scheme[pos] elements, the @exnraise[exn:fail:contract].
+ at scheme[pos] elements, then the @exnraise[exn:fail:contract].
@mz-examples[#:eval vec-eval
(vector-take #(1 2 3 4) 2)
]}
- at defproc[(vector-take-right [vec vector?] [pos exact-nonnegative-integer?]) list?]{
+ at defproc[(vector-take-right [vec vector?] [pos exact-nonnegative-integer?]) vector?]{
Returns a fresh vector whose elements are the last @scheme[pos] elements of
@scheme[vec]. If @scheme[vec] has fewer than
- at scheme[pos] elements, the @exnraise[exn:fail:contract].
+ at scheme[pos] elements, then the @exnraise[exn:fail:contract].
@mz-examples[#:eval vec-eval
(vector-take-right #(1 2 3 4) 2)
@@ -215,7 +215,7 @@
@defproc[(vector-drop [vec vector?] [pos exact-nonnegative-integer?]) vector?]{
Returns a fresh vector whose elements are the elements of @scheme[vec]
after the first @scheme[pos] elements. If @scheme[vec] has fewer
- than @scheme[pos] elements, the @exnraise[exn:fail:contract].
+ than @scheme[pos] elements, then the @exnraise[exn:fail:contract].
@mz-examples[#:eval vec-eval
(vector-drop #(1 2 3 4) 2)
@@ -224,7 +224,7 @@
@defproc[(vector-drop-right [vec vector?] [pos exact-nonnegative-integer?]) vector?]{
Returns a fresh vector whose elements are the elements of @scheme[vec]
before the first @scheme[pos] elements. If @scheme[vec] has fewer
- than @scheme[pos] elements, the @exnraise[exn:fail:contract].
+ than @scheme[pos] elements, then the @exnraise[exn:fail:contract].
@mz-examples[#:eval vec-eval
(vector-drop-right #(1 2 3 4) 2)
@@ -288,11 +288,11 @@
]}
- at defproc[(vector-count [proc procedure?] [lst list?] ...+)
- list?]{
+ at defproc[(vector-count [proc procedure?] [vec vector?] ...+)
+ exact-nonnegative-integer?]{
-Returns @scheme[(vector-length (vector-filter proc lst ...))], but
-without building the intermediate list.
+Returns the number of elements of the @scheme[vec ...] on which
+ at scheme[proc] does not evaluate to @scheme[#f].
@mz-examples[#:eval vec-eval
(vector-count even? #(1 2 3 4 5))