1+ open Core
2+
13module Peano = struct
24 type zero = unit
35
@@ -68,8 +70,8 @@ module Vect = struct
6870 let rec map : type n. f:('a -> 'b) -> ('a, n) t -> ('b, n) t =
6971 fun ~f ls -> match ls with [] -> [] | h :: t -> f h :: map ~f t
7072
71- let rec map2 :
72- type n . f :('a -> 'b -> 'c) -> ('a, n) t -> ('b, n) t -> ('c, n) t =
73+ let rec map2 : type n .
74+ f :('a -> 'b -> 'c) -> ('a, n) t -> ('b, n) t -> ('c, n) t =
7375 fun ~f ls_a ls_b ->
7476 match (ls_a, ls_b) with
7577 | [] , [] ->
@@ -81,9 +83,8 @@ module Vect = struct
8183 fun ~init ~f ls ->
8284 match ls with [] -> init | h :: t -> fold ~init: (f init h) ~f t
8385
84- let rec fold_map :
85- type n . init :'b -> f :('b -> 'a -> 'b * 'c ) -> ('a , n ) t -> 'b * ('c , n ) t
86- =
86+ let rec fold_map : type n .
87+ init :'b -> f:('b -> 'a -> 'b * 'c) -> ('a, n) t -> 'b * ('c, n) t =
8788 fun ~init ~f ls ->
8889 match ls with
8990 | [] ->
@@ -94,11 +95,11 @@ module Vect = struct
9495 (init'', h' :: t')
9596
9697 module Quickcheck_generator = struct
97- open Core_kernel. Quickcheck
98+ open Quickcheck
9899 open Generator.Let_syntax
99100
100- let rec map :
101- type n . f :('a -> 'b Generator.t) -> ('a, n) t -> ('b, n) t Generator.t =
101+ let rec map : type n .
102+ f :('a -> 'b Generator.t) -> ('a, n) t -> ('b, n) t Generator.t =
102103 fun ~f ls ->
103104 match ls with
104105 | [] ->
0 commit comments