diff --git a/src/Data/Tsil.hs b/src/Data/Tsil.hs index f6a61f6..9107002 100644 --- a/src/Data/Tsil.hs +++ b/src/Data/Tsil.hs @@ -55,6 +55,10 @@ instance Foldable Tsil where go acc Empty = acc go acc (xs :> x) = go (x : acc) xs +toReverseList :: Tsil a -> [a] +toReverseList Empty = [] +toReverseList (as :> a) = a : toReverseList as + null :: Tsil a -> Bool null Empty = True null (_ :> _) = False