ktg's comments

ktg | 11 years ago | on: John Carmack: “I just dumped the C++ server I wrote for a new one in Racket”

In for, in-range is faster.

http://docs.racket-lang.org/reference/sequences.html?q=in-ra...

An in-range application can provide better performance for number iteration when it appears directly in a for clause.

    -> (for ([i (in-range 1 16)])
        (match (list (modulo i 3) (modulo i 5))
          [(list 0 0) (displayln "fizzbuzz")]
          [(list 0 _) (displayln "fizz")]
          [(list _ 0) (displayln "buzz")]
          [_          (displayln i)]))

ktg | 12 years ago | on: L++ Language

v0.2: Macros are supported via Racket's macro system define-syntax.
page 1