Skip to content

Commit f735d26

Browse files
committed
refactor(option): simplify implementation of isSome
1 parent 505165a commit f735d26

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Core__Option.res

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,11 @@ let or = (opt, other) =>
9696
| None => other
9797
}
9898

99-
let isSome = opt =>
100-
switch opt {
101-
| Some(_) => true
102-
| None => false
103-
}
10499
let orElse = or
105100

106-
let isNone = value => value == None
101+
let isSome = opt => opt !== None
102+
103+
let isNone = opt => opt == None
107104

108105
let eqU = (a, b, f) =>
109106
switch a {

0 commit comments

Comments
 (0)