The r6rs number syntax has explicit cases for +i and -i
http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-7.html#node_sec_4.2
Robby
On Thu, Sep 10, 2020 at 7:27 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:
> I think you read the doc correctly, but there are programs that use +i
>
I think you read the doc correctly, but there are programs that use +i and
-i, so it's unclear if fixing the reader is desirable. Perhaps the
documentation should be adjusted instead.
Here’s an example of how people use +i and -i:
https://github.com/mbutterick/aoc-racket/blob/master/2019/03.rkt#L2
It looks like -i cannot be used as an identifier because it evaluates to the
complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I noticed
this when trying to map CLI flag strings to identifiers. -i was the only one in
the set to fall over.
In the Reading Numbers section of the r
3 matches
Mail list logo