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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jul 25 14:38:31 EDT 2011

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 `∏*').




Posted on the users mailing list.