|
|
|
|
|
by mrkeen
77 days ago
|
|
Nah. It involves multiple passes and setting the answer to the wrong value before (hopefully) setting it to the right value. Plus it forces you out of whatever lazy/streaming paradigm you had going on. If your foldr produces a list, downstream can start consuming it in constant memory as long as you let it do its thing. |
|