Skip to content
Snippets Groups Projects
Commit 0be30cd8 authored by bos's avatar bos
Browse files

A tiny simplification

parent 1aa063b7
No related branches found
No related tags found
No related merge requests found
......@@ -627,8 +627,7 @@ replace needle@(Text _ _ neeLen)
| otherwise = Text (A.run x) 0 len
where
ixs = indices needle haystack
cnt = L.length ixs
len = hayLen - (neeLen - repLen) * cnt
len = hayLen - (neeLen - repLen) * L.length ixs
x = do
marr <- A.new len
let loop (i:is) o d = do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment