The version with a threading macro, will create a lazy-sequence for each step in the pipeline. It will not instantiate the entire list, so it's O(1) memory overhead in terms of peak memory, but it churns O(N) extra garbage.
(->> things
(map model/find-thing)
(filter some?))
And the version with transducers, which will not create any intermediate sequences:
So the particular example here isn’t too different from exceptions. You’re unwinding the stack up to a predefined point— here, the callsite of foo, where with exceptions it would be up to the surrounding try/catch. Scala actually implements non-local returns (the only practical use I’ve had for call/cc) using exceptions: https://tpolecat.github.io/2014/05/09/return.html
You joke, and yet [Lucas 1988] uses an amusement park as a toy model to demonstrate how monetary shocks can affect real economic activity. The key difference between this and Chuck E. Cheese, though, is that Chuck E. Cheese is the only merchant that accepts their tokens for any sort of payment.
They do not exclude gas prices. The Consumer Price Index, which is what most people pay attention to and to which this article refers, currently weights gasoline at 3.7% of the basket of goods it tracks.
The version with a threading macro, will create a lazy-sequence for each step in the pipeline. It will not instantiate the entire list, so it's O(1) memory overhead in terms of peak memory, but it churns O(N) extra garbage.
And the version with transducers, which will not create any intermediate sequences:
It looks like there's a Common Lisp transducers library, but I have no idea how widely it's used.
https://github.com/fosskers/transducers