Commit 004aea21 authored by Matheus Andrade's avatar Matheus Andrade

Fixed replaceInList when the predicate never macthes

Check issue #34
parent c3c713f7
......@@ -108,7 +108,7 @@ where
(vs,ws,xs,ys,zs) = unzip5 vwxyzs
replaceInList :: !(a a -> Bool) !a ![a] -> [a]
replaceInList cond new [] = [new]
replaceInList _ _ [] = []
replaceInList cond new [x:xs]
| cond new x = [new : xs]
| otherwise = [x : replaceInList cond new xs]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment