@@ -8,7 +8,7 @@ use all the built-in syntax for records.
88
99module tuple
1010
11- export first/1, second/1, map_first /2, map_second /2, tuple/2
11+ export first/1, second/1, mapFirst /2, mapSecond /2, tuple/2
1212
1313
1414{-| Extract the first value from a tuple.
@@ -45,27 +45,27 @@ test "second example 2" =
4545
4646{-| Transform the first value in a tuple.
4747
48- map_first (fn x -> x + 1) (0, 0) == (1, 0)
48+ mapFirst (fn x -> x + 1) (0, 0) == (1, 0)
4949-}
50- val map_first 'a 'b 'aa : fn (fn 'a -> 'aa) ('a, 'b) -> ('aa, 'b)
51- let map_first func (x, y) =
50+ val mapFirst 'a 'b 'aa : fn (fn 'a -> 'aa) ('a, 'b) -> ('aa, 'b)
51+ let mapFirst func (x, y) =
5252 (func x, y)
5353
54- test "map_first " =
55- let result = map_first (fn x -> x + 1) (0, 0) in
54+ test "mapFirst " =
55+ let result = mapFirst (fn x -> x + 1) (0, 0) in
5656 assert.equal result (1, 0)
5757
5858
5959{-| Transform the second value in a tuple.
6060
61- map_second (fn x -> x + 1) (0, 0) == (0, 1)
61+ mapSecond (fn x -> x + 1) (0, 0) == (0, 1)
6262-}
63- val map_second 'a 'b 'bb : fn (fn 'b -> 'bb) ('a, 'b) -> ('a, 'bb)
64- let map_second func (x, y) =
63+ val mapSecond 'a 'b 'bb : fn (fn 'b -> 'bb) ('a, 'b) -> ('a, 'bb)
64+ let mapSecond func (x, y) =
6565 (x, func y)
6666
67- test "map_second " =
68- let result = map_second (fn x -> x + 1) (0, 0) in
67+ test "mapSecond " =
68+ let result = mapSecond (fn x -> x + 1) (0, 0) in
6969 assert.equal result (0, 1)
7070
7171
0 commit comments