[racket-dev] [plt] Push #24369: master branch updated

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Tue Feb 28 17:30:03 EST 2012

Something went wrong with the commit message. It's supposed to be:
Implement `range' as a very thin wrapper around `in-range'.

Sorry for the confusion.

Vincent



At Tue, 28 Feb 2012 17:26:00 -0500,
stamourv at racket-lang.org wrote:
> 
> stamourv has updated `master' from ffcda4741f to 249c1cc666.
>   http://git.racket-lang.org/plt/ffcda4741f..249c1cc666
> 
> =====[ 1 Commits ]======================================================
> 
> Directory summary:
>   91.8% collects/racket/
>    8.1% collects/scribblings/reference/
> 
> ~~~~~~~~~~
> 
> 249c1cc Vincent St-Amour <stamourv at racket-lang.org> 2012-02-28 16:20
> :
> | Remove dependency on unstable/port.
> :
>   M collects/racket/list.rkt                   |   10 +++-------
>   M collects/scribblings/reference/pairs.scrbl |    1 +
> 
> =====[ Overall Diff ]===================================================
> 
> collects/racket/list.rkt
> ~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/racket/list.rkt
> +++ NEW/collects/racket/list.rkt
> @@ -367,10 +367,6 @@
>  ;; similar to in-range, but returns a list
>  (define range
>    (case-lambda
> -    [(end)       (range 0     end 1)]
> -    [(start end) (range start end 1)]
> -    [(start end step)
> -     (unless (real? start) (raise-type-error 'range "real-number" start))
> -     (unless (real? end)   (raise-type-error 'range "real-number" end))
> -     (unless (real? step)  (raise-type-error 'range "real-number" step))
> -     (for/list ([i (in-range start end step)]) i)]))
> +    [(end)            (for/list ([i (in-range end)])            i)]
> +    [(start end)      (for/list ([i (in-range start end)])      i)]
> +    [(start end step) (for/list ([i (in-range start end step)]) i)]))
> 
> collects/scribblings/reference/pairs.scrbl
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/scribblings/reference/pairs.scrbl
> +++ NEW/collects/scribblings/reference/pairs.scrbl
> @@ -1014,6 +1014,7 @@ the result of @racket[proc]. Signals an error on an empty list.
>  
>  @defproc*[([(range [end real?]) list?]
>             [(range [start real?] [end real?] [step real? 1]) list?])]{
> +  Similar to @racket[in-range], but returns lists.
>    Returns a list of numbers starting at @racket[start] and whose successive
>    elements are computed by adding @racket[step] to their predecessor until
>    @racket[end] (excluded) is reached.

Posted on the dev mailing list.