File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ let flatMapU opt f = match opt with
45
45
46
46
let flatMap opt f = flatMapU opt (fun[@ bs] x -> f x)
47
47
48
- let getOrElse opt default = match opt with
48
+ let getWithDefault opt default = match opt with
49
49
| Some x -> x
50
50
| None -> default
51
51
52
- let has = function
52
+ let isSome = function
53
53
| Some _ -> true
54
54
| None -> false
55
55
56
- let isEmpty = function
56
+ let isNone = function
57
57
| Some _ -> false
58
58
| None -> true
Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ val mapU : 'a option -> ('a -> 'b [@bs]) -> 'b option
34
34
val map : 'a option -> ('a -> 'b ) -> 'b option
35
35
val flatMapU : 'a option -> ('a -> 'b option [@ bs]) -> 'b option
36
36
val flatMap : 'a option -> ('a -> 'b option ) -> 'b option
37
- val getOrElse : 'a option -> 'a -> 'a
38
- val has : 'a option -> bool
39
- val isEmpty : 'a option -> bool
37
+ val getWithDefault : 'a option -> 'a -> 'a
38
+ val isSome : 'a option -> bool
39
+ val isNone : 'a option -> bool
Original file line number Diff line number Diff line change @@ -46,23 +46,23 @@ function flatMap(opt, f) {
46
46
return flatMapU ( opt , Curry . __1 ( f ) ) ;
47
47
}
48
48
49
- function getOrElse ( opt , $$default ) {
49
+ function getWithDefault ( opt , $$default ) {
50
50
if ( opt ) {
51
51
return opt [ 0 ] ;
52
52
} else {
53
53
return $$default ;
54
54
}
55
55
}
56
56
57
- function has ( param ) {
57
+ function isSome ( param ) {
58
58
if ( param ) {
59
59
return /* true */ 1 ;
60
60
} else {
61
61
return /* false */ 0 ;
62
62
}
63
63
}
64
64
65
- function isEmpty ( param ) {
65
+ function isNone ( param ) {
66
66
if ( param ) {
67
67
return /* false */ 0 ;
68
68
} else {
You can’t perform that action at this time.
0 commit comments