On Sat, Dec 10, 2005 at 04:14:20PM +0000, Branimir Maksimovic wrote:
> Nice code.

But incorrect. I have broken it when refactoring :-/

Here is the correct version:

replace2 src dst = repl
  where
    repl input | src `isPrefixOf` input = dst ++ repl (drop (length src) input)
    repl (x:xs) = x : repl xs
    repl [] = []

> But it takes lot of ram (1GB is not enough )and can't execute my test.

Can you check this version?

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to