Hi Will,

My "numerics" package on Github has for/vector with some slight
extensions to yours. I think it also has more error checking so you
might want to look at it. I also have for/fold/vector and some
sequence abstractions. The code is all parameterised at expansion time
by the vector representation.

http://github.com/noelwelsh/numeric

N.


On Wed, Aug 18, 2010 at 5:02 PM, Will M. Farr <wmf...@gmail.com> wrote:
> Hello all,
>
> I've been thinking for a while about putting together a PLaneT library of 
> some iteration/comprehension forms that I often use that are not found in the 
> racket core.  Right now, I have a small it-comp.plt local PLaneT package that 
> contains
>
> for/vector
> for/flvector
> in-flvector
>
> The for/... forms have the option of having a first expression that gives the 
> length of the resulting object (similar to srfi-42's vector-of-length-ec 
> form) to allow generating more efficient code:
>
> (for/vector ((x (in-range 3))) x) => (vector 0 1 2)
> (for/vector 3 ((x (in-range 3))) x) => (vector 0 1 2) ; but more efficiently
>
> I'll be adding more forms from time to time, as I need them.  Eventually, 
> I'll release this to PLaneT, but I thought I might ask the community two 
> questions first:
>
> 1. Am I duplicating the functionality of some library?  (If so, I'll just 
> contribute to that instead.)
> 2. Do you have any iteration "favorites" that I should include in the 
> library?  (Code welcome, but I'm also happy to implement suggestions myself.)
>
> Alternately, if you guys want to add these to the core, I'd be happy to 
> contribute code and tests....
>
> Thanks,
> Will
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to