fix: minor fixes

This commit is contained in:
orion 2024-05-13 15:04:34 -05:00
parent e1c2481e70
commit e05c74f42f
Signed by: orion
GPG Key ID: 6D4165AE4C928719
2 changed files with 4 additions and 2 deletions

View File

@ -96,6 +96,7 @@ fromTransform t =
pure $ Done unit
yieldFromReadableHalf =
flip tailRecM unit $ const do
liftAff $ delay $ wrap 0.0
res <- liftEffect (O.read t)
case res of
O.ReadJust a -> do

View File

@ -85,9 +85,10 @@ chunked size = do
Rec.whileJust $ runMaybeT do
a <- MaybeT await
chunkPut a
len <- chunkLength
len <- lift chunkLength
when (len >= size) $ lift $ yield =<< Just <$> chunkTake
yield =<< Just <$> chunkTake
len <- chunkLength
when (len > 0) $ yield =<< Just <$> chunkTake
yield Nothing
-- | Equivalent of unix `uniq`, filtering out duplicate values passed to it.