@@ -2596,3 +2596,23 @@ nub = Fold step initial extract
2596 else return $ Partial (Set.insert x set, Just x)
2596 else return $ Partial (Set.insert x set, Just x)
2598 extract = return . snd
2598 extract = return . snd
2601+the :: (Eq a, Monad m) => Fold m a (Maybe a)
2602+the = Fold step initial extract
2607+ return $ Partial Nothing
2610+ return $ Partial (Just x)
2612+ step old@(Just x0) x =