Namely,
foo :: Bit -> Int -> Vector Bit -> Either Word Int
such that foo b n vec either returns the index of n-th occurence of b bit in vec or the total number of bits b in vec.
This is similar in spirit to https://hackage.haskell.org/package/text-2.1.2/docs/Data-Text.html#v:measureOff.
Namely,
such that
foo b n veceither returns the index ofn-th occurence ofbbit invecor the total number of bitsbinvec.This is similar in spirit to https://hackage.haskell.org/package/text-2.1.2/docs/Data-Text.html#v:measureOff.