From 843103a6d2774310fd18ee12f04ae1268da93c52 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 7 Mar 2019 11:15:21 -0600 Subject: [PATCH] doc: remove useless abbreviation in the readme --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cfe2c86..90ec053 100644 --- a/README.md +++ b/README.md @@ -166,22 +166,20 @@ enumerating the ways we can insert an element in a list. ```ocaml # open Iter.Infix;; -# module S = Iter ;; -module S = Iter # let rec insert x l = match l with - | [] -> S.return [x] + | [] -> Iter.return [x] | y :: tl -> - S.append - S.(insert x tl >|= fun tl' -> y :: tl') - (S.return (x :: l)) ;; -val insert : 'a -> 'a list -> 'a list S.t = + Iter.append + (insert x tl >|= fun tl' -> y :: tl') + (Iter.return (x :: l)) ;; +val insert : 'a -> 'a list -> 'a list Iter.t = # let rec permute l = match l with - | [] -> S.return [] + | [] -> Iter.return [] | x :: tl -> permute tl >>= insert x ;; -val permute : 'a list -> 'a list S.t = +val permute : 'a list -> 'a list Iter.t = -# permute [1;2;3;4] |> S.take 2 |> S.to_list ;; +# permute [1;2;3;4] |> Iter.take 2 |> Iter.to_list ;; - : int list list = [[4; 3; 2; 1]; [4; 3; 1; 2]] ```