3 ms·
Yes, I'm beginning to think the simple solution to this boils down to some flavor of coroutines/continuations/laziness - basically, the stuff that Scheme has th
by gruseom 18y ago
Yes, I'm beginning to think the simple solution to this boils down to some flavor of coroutines/continuations/laziness - basically, the stuff that Scheme has that CL does not.
The reason I find this interesting is that it's the first real problem I've run into where CL didn't have an easy way to do what I want. There are workarounds, of course. But it's interesting to run into a production (as opposed to academic) problem where the elegant solution isn't simply available.
- simonb 18y agoHave you tried (semi-standard) SERIES? http://series.sourceforge.net http://series.sourceforge.net "A series is a data structure much like a sequence, with similar kinds of operations. The difference is that in many situations, operations on series may be composed functionally and yet execute iteratively, without the need to construct intermediate series values explicitly. In this manner, series provide both the clarity of a functional programming style and the efficiency of an iterative programming style."
- gruseom 18y agoNo, I haven't tried it. In fact, I didn't know it was available open-source. Do you use it? If so, do you like it?
- silverlake 18y agoYou can implement the local transformations for short cut deforestation with CL macros. Then you can easily reuse the technique everywhere. Look up Andy Gill's paper from 1993.
- gruseom 18y agoGoogle brings up a few papers from around that time. The closest match looks like "A short cut to deforestation" - is that the one you mean? http://portal.acm.org/citation.cfm?id=165214 http://portal.acm.org/citation.cfm?id=165214