summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-03-28 06:43:42 +0600
committerDaniil Baturin <daniil@baturin.org>2015-03-28 06:43:42 +0600
commit2f75b0e951989ff04b1e116a1190390b871bdbed (patch)
tree1a71491fc002b0f38398b92d79d15f91a1f4e678 /src
parent3a5148b6535d2446be0b7fc3599fd668d927409b (diff)
downloadvyconf-2f75b0e951989ff04b1e116a1190390b871bdbed.tar.gz
vyconf-2f75b0e951989ff04b1e116a1190390b871bdbed.zip
Make Vylist.replace raise Not_found for nonexistent elements.
Diffstat (limited to 'src')
-rw-r--r--src/vylist.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vylist.ml b/src/vylist.ml
index 9afea5f..3842076 100644
--- a/src/vylist.ml
+++ b/src/vylist.ml
@@ -12,7 +12,7 @@ let rec remove p xs =
let rec replace p x xs =
match xs with
- | [] -> []
+ | [] -> raise Not_found
| x' :: xs' -> if (p x') then x :: xs'
else x' :: (replace p x xs')