>>> import qualified Data.Vector as V >>> V.scanr1 min $ V.fromListN 5 [3,1,4,2,4] [1,1,2,2,4] >>> V.scanr1 max $ V.fromListN 5 [4,5,2,3,1] [5,5,3,3,1] >>> V.scanr1 min (V.empty :: V.Vector Int) []
>>> import qualified Data.Vector as V >>> V.scanr1' min $ V.fromListN 5 [3,1,4,2,4] [1,1,2,2,4] >>> V.scanr1' max $ V.fromListN 5 [4,5,2,3,1] [5,5,3,3,1] >>> V.scanr1' min (V.empty :: V.Vector Int) []
>>> import qualified Data.Vector.Strict as V >>> V.scanr1 min $ V.fromListN 5 [3,1,4,2,4] [1,1,2,2,4] >>> V.scanr1 max $ V.fromListN 5 [4,5,2,3,1] [5,5,3,3,1] >>> V.scanr1 min (V.empty :: V.Vector Int) []
>>> import qualified Data.Vector.Strict as V >>> V.scanr1' min $ V.fromListN 5 [3,1,4,2,4] [1,1,2,2,4] >>> V.scanr1' max $ V.fromListN 5 [4,5,2,3,1] [5,5,3,3,1] >>> V.scanr1' min (V.empty :: V.Vector Int) []
>>> import qualified Data.Vector.Primitive as VP >>> VP.scanr1 min $ VP.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VP.scanr1 max $ VP.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VP.scanr1 min (VP.empty :: VP.Vector Int) []
>>> import qualified Data.Vector.Primitive as VP >>> VP.scanr1' min $ VP.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VP.scanr1' max $ VP.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VP.scanr1' min (VP.empty :: VP.Vector Int) []
>>> import qualified Data.Vector.Storable as VS >>> VS.scanr1 min $ VS.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VS.scanr1 max $ VS.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VS.scanr1 min (VS.empty :: VS.Vector Int) []
>>> import qualified Data.Vector.Storable as VS >>> VS.scanr1' min $ VS.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VS.scanr1' max $ VS.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VS.scanr1' min (VS.empty :: VS.Vector Int) []
>>> import qualified Data.Vector.Unboxed as VU >>> VU.scanr1 min $ VU.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VU.scanr1 max $ VU.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VU.scanr1 min (VU.empty :: VU.Vector Int) []
>>> import qualified Data.Vector.Unboxed as VU >>> VU.scanr1' min $ VU.fromListN 5 [3,1,4,2,4 :: Int] [1,1,2,2,4] >>> VU.scanr1' max $ VU.fromListN 5 [4,5,2,3,1 :: Int] [5,5,3,3,1] >>> VU.scanr1' min (VU.empty :: VU.Vector Int) []