This is also possible with the Monoid instance posted in this answer: Getting multiple results from map with lens
import Data.Monoid
import Control.Lens
instance Monoid r => Monoid (Accessor r a) where
mempty = Accessor mempty
mappend (Accessor a) (Accessor b) = Accessor $ a <> b
Test:
*Control.Lens Data.Monoid> ('a','b','c','d') ^.. (_1 <> _2 <> _3)
"abc"
"abc" is just ['a','b','c'], so this does what you want.
(Update: Modern lens
versions include this instance by default, so the second code snippet should just work out of the box.)