Document surprising behavior of in-range
with floats and zero.
This commit is contained in:
parent
fae55e83e2
commit
c652afa894
|
@ -180,6 +180,11 @@ each element in the sequence.
|
||||||
|
|
||||||
@examples[#:label "Example: sum of even numbers" #:eval sequence-evaluator
|
@examples[#:label "Example: sum of even numbers" #:eval sequence-evaluator
|
||||||
(for/sum ([x (in-range 0 100 2)]) x)]
|
(for/sum ([x (in-range 0 100 2)]) x)]
|
||||||
|
|
||||||
|
When given zero as @racket[step], @racket[in-range] returns an infinite
|
||||||
|
sequence. It may also return infinite sequences when @racket[step] is a very
|
||||||
|
small number, and either @racket[step] or the sequence elements are
|
||||||
|
floating-point numbers.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user