diff --git a/collects/scribblings/guide/scripts.scrbl b/collects/scribblings/guide/scripts.scrbl index cfea9dd0f8..5647b65e65 100644 --- a/collects/scribblings/guide/scripts.scrbl +++ b/collects/scribblings/guide/scripts.scrbl @@ -5,9 +5,9 @@ @title[#:tag "scripts"]{Scripts} -Scheme files can be turned into executable scripts on Unix and Mac OS -X. On Windows, one option is to use a compatibility layer like Cygwin, -or write scripts as batch files. +Scheme files can be turned into executable scripts under Unix and Mac +OS X. Under Windows, a compatibility layer like Cygwin support the +same kind of scripts, or scripts can be implemented as batch files. @section{Unix Scripts} @@ -119,7 +119,7 @@ the script file turns out to be valid input to both @exec{/bin/sh} and @section{Windows Batch Files} A similar trick can be used to write Scheme code in Windows -@as-index{@tt{batch}} files: +@as-index{@tt{.bat}} batch files: @verbatim[#:indent 2]|{ ; @echo off diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 631b168062..b10430ef4c 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -589,9 +589,9 @@ produces @scheme[+nan.0] in the case that neither @scheme[y] nor Returns @scheme[#t] when the @scheme[m]th bit of @scheme[n] is set in @scheme[n]'s (semi-infinite) two's complement representation. -This is equivalent to +This operation is equivalent to @scheme[(not (zero? (bitwise-and n (arithmetic-shift 1 m))))], -but is faster and runs in constant time when @scheme[n] is positive. +but it is faster and runs in constant time when @scheme[n] is positive. @mz-examples[(bitwise-bit-set? 5 0) (bitwise-bit-set? 5 2) (bitwise-bit-set? -5 (expt 2 700))]} @@ -605,7 +605,7 @@ but is faster and runs in constant time when @scheme[n] is positive. Extracts the bits between position @scheme[start] and @scheme[(- end 1)] (inclusive) from @scheme[n] and shifts them down to the least significant portion of the number. -This is equivalent to this computation, +This operation is equivalent to the computation @schemeblock[ (bitwise-and (sub1 (arithmetic-shift 1 (- end start))) @@ -616,8 +616,8 @@ but it runs in constant time when @scheme[n] is positive, @scheme[start] and @scheme[end] are fixnums, and @scheme[(- end start)] is no more than the maximum width of a fixnum. -Each pair of examples below uses the same numbers, but shows the result in -both binary and as integers. +Each pair of examples below uses the same numbers, showing the result +both in binary and as integers. @mz-examples[(format "~b" (bitwise-bit-field (string->number "1101" 2) 1 1)) (bitwise-bit-field 13 1 1) diff --git a/collects/scribblings/reference/sets.scrbl b/collects/scribblings/reference/sets.scrbl index 1a6f35560c..5a137b6d7a 100644 --- a/collects/scribblings/reference/sets.scrbl +++ b/collects/scribblings/reference/sets.scrbl @@ -48,6 +48,12 @@ that they appear as @scheme[v]s, so in the first two cases, an earlier element that is @scheme[equal?] or @scheme[eqv?] but not @scheme[eq?] to a later element takes precedence over the later element.} + +@defproc[(set-empty? [set set?]) boolean?]{ + +Returns @scheme[#t] if @scheme[set] has no members, @scheme[@f] +otherwise.} + @defproc[(set-member? [set set?] [v any/c]) boolean?]{ Returns @scheme[#t] if @scheme[v] is in @scheme[set], @scheme[#f]