Skip to content

Commit

Permalink
Std: Option::isNone
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Apr 9, 2024
1 parent 4562ce8 commit 281119a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/std/option.no
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ impl <T> Option<T> {
}
}

pub fn isNone(self): Bool {
self.isSome().not()
}

pub fn or(self, other: Option<T>): Option<T> {
match self {
Some() { self }
Expand Down

0 comments on commit 281119a

Please sign in to comment.