[racket] A question about code-style (and memory usage)

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jul 25 15:40:56 EDT 2011

On Mon, Jul 25, 2011 at 2:38 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 24 Jul 2011 14:44:24 +0200, Stephan Houben wrote:
>> [...] I find that summing comes up sufficiently
>> often to deserve its own compact syntax, so I propose:
>>
>> ;; Solution 3
>> (require (planet "mathsymbols.rkt" ("stephanh" "mathsymbols.plt" 1 0)))
>>
>> (Σ ([i (in-range 1 (add1 N))])
>>         (string-length (integer->string i)))
>
> I agree. Unless there are objections, I plan to add `for/sum' and
> `for/product' with aliases `Σ' and `∏' to `racket/base' (as well as
> `for*/sum' and `for*/product' with aliases `Σ*' and `∏*').

Excellent!

Robby



Posted on the users mailing list.