From c302c973de6090656177cc27cc62e3fb83118af3 Mon Sep 17 00:00:00 2001 From: William Rusnack Date: Sun, 12 Nov 2023 18:17:21 -0500 Subject: [PATCH] addded non-default initTails implementation for Seq --- mono-traversable/src/Data/Sequences.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mono-traversable/src/Data/Sequences.hs b/mono-traversable/src/Data/Sequences.hs index ad1805db..108f9140 100644 --- a/mono-traversable/src/Data/Sequences.hs +++ b/mono-traversable/src/Data/Sequences.hs @@ -1008,6 +1008,11 @@ instance IsSequence (Seq.Seq a) where {-# INLINE indexEx #-} {-# INLINE unsafeIndex #-} + initTails = its . (,) mempty + where + its x@(is, y Seq.:<| ts) = x : its (is Seq.:|> y, ts) + its (_, Seq.Empty) = mempty + instance SemiSequence (V.Vector a) where type Index (V.Vector a) = Int reverse = V.reverse