-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I was creating my own enumeration library when I decided to look closer at cl-transducers. I'm using thunks for expensive computations. A few questions:
-
Would you like this added to cl-transducers8
Addinglazyto construct them,ensure-forcedfor evaluation etc. -
Should knowledge about them be added to transducers that needs to look at the values?
Changing(funcall pred input)to(funcall pred (ensure-forced input))for the transducers that needs to evaluate the input.
Without this, users themselves have to make sure to add a step to force evaluation before each transducer than needs to evaluate the input -- which seems quite leaky.
While it's very little code needed, it's more of an architectural question. I found for my own enumeration library that having lazy supported by take-while and similar functions made the calling code more robust. But it also means people writing transducers needs to know that they have to ensure thunks has been evaluated.