I've heard that the SERIES package adds functionality similar to Haskell or Clojure's lazy lists to CL. I know that it actually transforms "lazy" code into in-place iteration, rather than actually implementing pipe/streams/lazy-list/whatever-you-call-it. Messing around with it, it seems a little verbose, such as performing folds/reductions over data is something like: (collect-fn 'integer #'(lambda () 1) #'* my-series) (reduce #'* my-list :initial-value 1) Now for the actual question: does anyone actually use SERIES in production code or is it just a historical curiosity?
helmut.rohrbacher@gmail.com wrote: > (reduce #'* my-list :initial-value 1) Racket: (foldl * 1 '(2 3 4)) => 24
helmut.rohrbacher@gmail.com writes: > I've heard that the SERIES package adds functionality similar to > Haskell or Clojure's lazy lists to CL. I know that it actually > transforms "lazy" code into in-place iteration, rather than actually > implementing pipe/streams/lazy-list/whatever-you-call-it. > > Messing around with it, it seems a little verbose, such as performing > folds/reductions over data is something like: > > (collect-fn 'integer #'(lambda () 1) #'* my-series) > > (reduce #'* my-list :initial-value 1) > > Now for the actual question: does anyone actually use SERIES in > production code or is it just a historical curiosity? Rahul Jain often talked up SERIES as a very useful tool. He might have some comments for you about it. Zach
* helmut.rohrbacher@gmail.com <02d088e3-7653-422b-b482-9f8ac0e8c7e3@googlegroups.com> : Wrote on Mon, 11 Jun 2012 02:06:54 -0700 (PDT): | I've heard that the SERIES package adds functionality similar to | Haskell or Clojure's lazy lists to CL. I know that it actually | transforms "lazy" code into in-place iteration, rather than actually | implementing pipe/streams/lazy-list/whatever-you-call-it. | | Now for the actual question: does anyone actually use SERIES in | production code or is it just a historical curiosity? In recent memory, I've only seen Joe Marshall display proficiency with SERIES in public (Eg. lisp-hug, xref:11409). However I do not believe it adds to the language in terms of "language expressiveness" as some schemers have quantified it. To support the lazy paradigms you mention, I believe it is important to specify "Co-routines" for CL, (and rather than adopt the full call/cc style which scheme has, one could, with CL, start with the condition system for a conceptual model for freezing and manipulating the stack) --- Madhu
WJ wrote: > helmut.rohrbacher@gmail.com wrote: > > > (reduce #'* my-list :initial-value 1) > > Racket: > > (foldl * 1 '(2 3 4)) > => 24 Gauche Scheme: (fold * 1 my-list)
![]() |
0 |
![]() |