mapcan for series 
Author Message
 mapcan for series

I'm looking at doing some stuff with the series package (using the
implementation from sourceforge).

I've written a series analogue of mapcan - lets call it map-catentate:

(defun map-catentate (fn s)
  ...)

fn returns a series, and map-catenate returns the series obtained by
catenating together the series resulting from applying fn to elements
of s (in the obvious order).

The trouble is I haven't been able write a version that will
optimtize. ISTM that it should be possible to do this.

Can anyone show me how this can be done (or explain why it can't)?

TIA.



Mon, 04 Aug 2003 18:04:59 GMT  
 mapcan for series

Quote:

> I'm looking at doing some stuff with the series package (using the
> implementation from sourceforge).
> I've written a series analogue of mapcan - lets call it map-catentate:
> (defun map-catentate (fn s)
>   ...)
> fn returns a series, and map-catenate returns the series obtained by
> catenating together the series resulting from applying fn to elements
> of s (in the obvious order).

Isn't this one of those cases that it can't optimize almost by
definition.  It's a long time since I looked at series, but I remember
that it relies on being able to do things in lock-step, but in this
case it really can't do that, because you are concatenating series
together?

Or maybe I am confused.

--tim



Tue, 05 Aug 2003 19:37:28 GMT  
 mapcan for series


 >> I'm looking at doing some stuff with the series package (using the
 >> implementation from sourceforge).

 >> I've written a series analogue of mapcan - lets call it
 >> map-catentate:

 >> (defun map-catentate (fn s) ...)

 >> fn returns a series, and map-catenate returns the series obtained
 >> by catenating together the series resulting from applying fn to
 >> elements of s (in the obvious order).

 Tim> Isn't this one of those cases that it can't optimize almost by
 Tim> definition.  It's a long time since I looked at series, but I
 Tim> remember that it relies on being able to do things in lock-step,
 Tim> but in this case it really can't do that, because you are
 Tim> concatenating series together?

Maybe it's just that I don't understand the warning messages. I don't
expect the evaluation of catenated series to be parallelized. So maybe
I should just need to add appropriate declarations to make the
warnings go away in this particular case.

I was under the impression that I was being warned about something
over and above this.

 Tim> Or maybe I am confused.

Probably not.



Sat, 09 Aug 2003 19:18:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. mapcan,nconc

2. MAPCAN?

3. Scheme for Psion Series 3a or Series 5?

4. series

5. Julia/Mandelbrot Computations in J; was series

6. S/360-Z series timings, then and now?

7. MQ-Series.

8. Replacement for HP series 300 assembler

9. IBM's Z6 series

10. MQ Series

11. Idea: Stanley Jordan to Host A Video Series on Array Languages

12. MQ Series & CICS question

 

 
Powered by phpBB® Forum Software