strsu               :: [(String, Bool)] -> String -> String -> [String] -> Int -> String
strsu xs ys zs ass i | i == length xs                       = strsub xs ass
                     | snd (xs!!i) || not (isInfixOf ys fs) = strsu xs ys zs ass (succ i)
                     | fs == ys                             = strsu (take i xs ++ ((zs, True) : drop (i+1) xs)) ys zs ass (succ i)
                     | isPrefixOf ys fs                     = strsu (take i xs ++ ((zs, True) : (drop (length ys) fs, False) : drop (i+1) xs)) ys zs ass (succ i)
                     | otherwise                            = strsu (take i xs ++ ((ps, False) : (zs, True) : (drop (length ps + length ys) fs, False) : drop (i+1) xs)) ys zs ass (i+2)
                     where fs = fst (xs!!i)
                           ps = prefix ys fs
strsu               :: [(String, Bool)] -> String -> String -> [String] -> Int -> String
strsu xs ys zs ass i | i == length xs                       = strsub xs ass
                     | snd (xs!!i) || not (isInfixOf ys fs) = strsu xs ys zs ass (succ i)
                     | fs == ys                             = strsu (take i xs ++ ((zs, True) : drop (i+1) xs)) ys zs ass (succ i)
                     | isPrefixOf ys fs                     = strsu (take i xs ++ ((zs, True) : (drop (length ys) fs, False) : drop (i+1) xs)) ys zs ass (succ i)
                     | otherwise                            = strsu (take i xs ++ ((ps, False) : (zs, True) : (drop (length ps + length ys) fs, False) : drop (i+1) xs)) ys zs ass (i+2)
                     where fs = fst (xs!!i)
                           ps = prefix ys fs
strsu xs ys zs ass i | i == length xs                       = strsub xs ass
                     | snd (xs!!i) || not (isInfixOf ys fs) = strsu xs ys zs ass (succ i)
                     | fs == ys                             = strsu (take i xs ++ ((zs, True) : drop (i+1) xs)) ys zs ass (succ i)
                     | isPrefixOf ys fs                     = strsu (take i xs ++ ((zs, True) : (drop (length ys) fs, False) : drop (i+1) xs)) ys zs ass (succ i)
                     | otherwise                            = strsu (take i xs ++ ((ps, False) : (zs, True) : (drop (length ps + length ys) fs, False) : drop (i+1) xs)) ys zs ass (i+2)
                     where fs = fst (xs!!i)
                           ps = prefix ys fs