File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 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
4545
4646let flatMap opt f = flatMapU opt (fun[@ bs] x -> f x)
4747
48- let getOrElse opt default = match opt with
48+ let getWithDefault opt default = match opt with
4949 | Some x -> x
5050 | None -> default
5151
52- let has = function
52+ let isSome = function
5353 | Some _ -> true
5454 | None -> false
5555
56- let isEmpty = function
56+ let isNone = function
5757 | Some _ -> false
5858 | 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
3434val map : 'a option -> ('a -> 'b ) -> 'b option
3535val flatMapU : 'a option -> ('a -> 'b option [@ bs]) -> 'b option
3636val 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) {
4646 return flatMapU ( opt , Curry . __1 ( f ) ) ;
4747}
4848
49- function getOrElse ( opt , $$default ) {
49+ function getWithDefault ( opt , $$default ) {
5050 if ( opt ) {
5151 return opt [ 0 ] ;
5252 } else {
5353 return $$default ;
5454 }
5555}
5656
57- function has ( param ) {
57+ function isSome ( param ) {
5858 if ( param ) {
5959 return /* true */ 1 ;
6060 } else {
6161 return /* false */ 0 ;
6262 }
6363}
6464
65- function isEmpty ( param ) {
65+ function isNone ( param ) {
6666 if ( param ) {
6767 return /* false */ 0 ;
6868 } else {
You can’t perform that action at this time.
0 commit comments