From 31bca45f76ac5618781d8e7e3149d7415cbefc7e Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 13 Apr 2015 20:13:18 +0600 Subject: Don't multiply apostrophes without a strong need. --- src/vylist.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/vylist.ml b/src/vylist.ml index 3842076..ec04055 100644 --- a/src/vylist.ml +++ b/src/vylist.ml @@ -1,20 +1,20 @@ let rec find p xs = match xs with | [] -> None - | x :: xs' -> if (p x) then (Some x) - else find p xs' + | y :: ys -> if (p y) then (Some y) + else find p ys let rec remove p xs = match xs with | [] -> [] - | x :: xs' -> if (p x) then xs' - else x :: (remove p xs') + | y :: ys -> if (p y) then ys + else y :: (remove p ys) 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') + | y :: ys -> if (p y) then x :: ys + else y :: (replace p x ys) let rec insert_before p x xs = match xs with -- cgit v1.2.3