binary
binary copied to clipboard
listUntilEnd
I often find myself needing this function:
listUntilEnd :: (Binary a) => Get [a]
listUntilEnd = do
done <- isEmpty
if done then return [] else do
next <- get
rest <- listUntilEnd
return (next:rest)
+1. I needed such function on many occasions as well. It's especially useful in conjuction with isolate