Re: Discussion: reconsider lens-like exports from containers

I *believe* that the [] Applicative will prove that adjustA is sometimes
more efficient than any implementation built on the current API. In that
context, it should be possible to descend to a leaf once and then ascend
from it many times.
foo n xs = adjustA f n xs where
f :: Char -> [Char]
f x = ...
This only travels to the nth element once and effectively saves the path to
that spot so it can produce many sequences where that element is different.
You could do something conceptually similar by splitting the sequence at
that point and putting the pieces together many times, but in practice that
would be awful.
On Apr 26, 2016 3:18 PM, "Marcin Mrotek"
participants (1)
-
David Feuer