Skip to content

Commit

Permalink
New: .not alias to .invert on observables of booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
raquo committed Jul 10, 2024
1 parent 609e973 commit 679292a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class BooleanObservable[Self[+_] <: Observable[_]](val observable: BaseObservabl
observable.map(!_)
}

@inline def not: Self[Boolean] = invert

def foldBoolean[A](
whenTrue: => A,
whenFalse: => A
Expand Down

0 comments on commit 679292a

Please sign in to comment.