doc: remove useless abbreviation in the readme

This commit is contained in:
Simon Cruanes 2019-03-07 11:15:21 -06:00
parent f447b39e4e
commit 843103a6d2

View file

@ -166,22 +166,20 @@ enumerating the ways we can insert an element in a list.
```ocaml ```ocaml
# open Iter.Infix;; # open Iter.Infix;;
# module S = Iter ;;
module S = Iter
# let rec insert x l = match l with # let rec insert x l = match l with
| [] -> S.return [x] | [] -> Iter.return [x]
| y :: tl -> | y :: tl ->
S.append Iter.append
S.(insert x tl >|= fun tl' -> y :: tl') (insert x tl >|= fun tl' -> y :: tl')
(S.return (x :: l)) ;; (Iter.return (x :: l)) ;;
val insert : 'a -> 'a list -> 'a list S.t = <fun> val insert : 'a -> 'a list -> 'a list Iter.t = <fun>
# let rec permute l = match l with # let rec permute l = match l with
| [] -> S.return [] | [] -> Iter.return []
| x :: tl -> permute tl >>= insert x ;; | x :: tl -> permute tl >>= insert x ;;
val permute : 'a list -> 'a list S.t = <fun> val permute : 'a list -> 'a list Iter.t = <fun>
# 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]] - : int list list = [[4; 3; 2; 1]; [4; 3; 1; 2]]
``` ```