{- Identity error model

   that is, just return the sequence without errors
-}

module Id where

import Bio.Sequence

data IdState = IS { pos, len :: Offset }

id_init p = IS p 0

idseq :: Sequence -> Offset -> IdState -> Maybe (Char,IdState)
idseq s e (IS p l) = if l >= e || p+l >= seqlength s then Nothing 
                     else Just (s!(p+l), IS p (l+1))
