nubSeq :: Ord a => Seq a -> Seq a
nubSeq = go mempty
  where
    go cache entries = case Seq.viewl entries of
        EmptyL -> mempty
        x :< xs
            | S.member x cache -> go cache xs
            | otherwise -> x <| go (S.insert x cache) xs
nubSeq :: Ord a => Seq a -> Seq a
nubSeq = go mempty
  where
    go cache entries = case Seq.viewl entries of
        EmptyL -> mempty
        x :< xs
            | S.member x cache -> go cache xs
            | otherwise -> x <| go (S.insert x cache) xs
nubSeq = go mempty
  where
    go cache entries = case Seq.viewl entries of
        EmptyL -> mempty
        x :< xs
            | S.member x cache -> go cache xs
            | otherwise -> x <| go (S.insert x cache) xs