{"body":"untilM p m = loop where\n    loop = do\n        a <- m\n        if p a then pure [a] else (a :) <$> loop\n\ngetVarint = foldl' maskAndShift 0 <$> untilM endOfVarint getWord8 where\n    maskAndShift acc byte = acc `shiftL` 7 .|. fromIntegral (clearBit byte 7)\n    endOfVarint byte = not $ testBit byte 7","name":"","extension":"hs","url":"https://www.irccloud.com/pastebin/xJDEEfRk","modified":1616189868,"id":"xJDEEfRk","size":296,"lines":8,"own_paste":false,"theme":"","date":1616189868}