Skip to content

Commit cd274b7

Browse files
authored
Merge pull request #7 from lpil/lp/camel
snake_case -> camelCase
2 parents 175f092 + a27981a commit cd274b7

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/option.alp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export_type option
77

88
export some/1, map/2, orElse/2, flatten/1, flatMap/2
99

10-
type option 'a = Some 'a | None
10+
type option 'a
11+
= Some 'a
12+
| None
1113

1214
{- Convenience method to generate a non-empty option.
1315
-}
@@ -35,12 +37,12 @@ test "Applying `some` to a literal value yields a non-empty option" =
3537
```map (fn x -> x + x) Some 2```
3638

3739
The output type is dependent on the supplied function so if we have a function
38-
`int_to_string` with the type `int -> string`, the following will yield an
40+
`intToString` with the type `int -> string`, the following will yield an
3941
`option string`:
4042

4143
```
4244
-- the result will be Some "2":
43-
map int_to_string Some 2```
45+
map intToString Some 2```
4446
```
4547
-}
4648
val map 'a 'b : fn (fn 'a -> 'b) (option 'a) -> option 'b

src/tuple.alp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use all the built-in syntax for records.
88

99
module 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

Comments
 (0)