diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-03-28 06:43:42 +0600 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-03-28 06:43:42 +0600 |
commit | 2f75b0e951989ff04b1e116a1190390b871bdbed (patch) | |
tree | 1a71491fc002b0f38398b92d79d15f91a1f4e678 /src | |
parent | 3a5148b6535d2446be0b7fc3599fd668d927409b (diff) | |
download | vyconf-2f75b0e951989ff04b1e116a1190390b871bdbed.tar.gz vyconf-2f75b0e951989ff04b1e116a1190390b871bdbed.zip |
Make Vylist.replace raise Not_found for nonexistent elements.
Diffstat (limited to 'src')
-rw-r--r-- | src/vylist.ml | 2 |
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') |